|
2 | 2 | Network Interfaces |
3 | 3 | ================== |
4 | 4 |
|
| 5 | +.. _network_interfaces_overview: |
| 6 | + |
| 7 | +Network Interfaces Overview |
| 8 | +============================ |
| 9 | + |
| 10 | +**Overview**. NuttX includes a comprehensive network stack that provides |
| 11 | +standard BSD socket interface and DNS resolution capabilities. The network |
| 12 | +subsystem is optional and can be configured based on application requirements. |
| 13 | + |
| 14 | +**BSD Socket Interface**. NuttX supports a BSD-compatible socket interface layer |
| 15 | +that provides familiar networking APIs for application developers. These socket |
| 16 | +interfaces can be enabled by settings in the architecture configuration file. |
| 17 | +The socket layer supports multiple protocol families including IPv4 (AF_INET) |
| 18 | +and IPv6 (AF_INET6), as well as various socket types such as stream sockets |
| 19 | +(SOCK_STREAM), datagram sockets (SOCK_DGRAM), and raw sockets. |
| 20 | + |
| 21 | +**DNS Resolution**. The NuttX network stack includes a lightweight DNS resolver |
| 22 | +that allows applications to resolve hostnames to IP addresses. The DNS resolver |
| 23 | +supports multiple nameservers, both IPv4 and IPv6 queries, and provides a |
| 24 | +callback mechanism for nameserver change notifications. |
| 25 | + |
| 26 | +**Programming Interface**. The network interfaces provided by NuttX closely |
| 27 | +follow POSIX standards, making it easy to port existing network applications |
| 28 | +to NuttX. |
| 29 | + |
| 30 | +Network Functions |
| 31 | +================= |
| 32 | + |
| 33 | +Socket Functions (``sys/socket.h``) |
| 34 | +----------------------------------- |
| 35 | + |
5 | 36 | NuttX supports a BSD-compatible socket interface layer. These socket |
6 | 37 | interface can be enabled by settings in the architecture configuration |
7 | 38 | file. Those socket APIs are discussed in |
8 | 39 | the following paragraphs. |
9 | 40 |
|
| 41 | + |
10 | 42 | - :c:func:`socket` |
11 | 43 | - :c:func:`bind` |
12 | 44 | - :c:func:`connect` |
@@ -413,9 +445,8 @@ the following paragraphs. |
413 | 445 | - ``NOBUFS``. Insufficient resources are available in the system to |
414 | 446 | complete the call. |
415 | 447 |
|
416 | | -============= |
417 | | -DNS Functions |
418 | | -============= |
| 448 | +DNS Functions (``net/dns.h``) |
| 449 | +----------------------------------- |
419 | 450 |
|
420 | 451 | NuttX provides DNS resolver functions for configuring and managing DNS |
421 | 452 | servers. These functions are defined in ``nuttx/net/dns.h`` and allow |
|
0 commit comments