Differences between current version and predecessor to the previous major change of ip(7).
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 5 | Last edited on Monday, September 5, 2005 2:01:13 pm | by ScottLamb | |
Older page: | version 3 | Last edited on Tuesday, June 4, 2002 12:30:58 am | by perry | Revert |
@@ -88,17 +88,17 @@
sockets __sin_port__ is set to the IP
protocol.
-struct sockaddr_in {
-sa_family_t sin_family; /* address family: AF_INET */
-u_int16_t sin_port; /* port in network byte order */
-struct in_addr sin_addr; /* internet address */
-};
-/* Internet address. */
-struct in_addr {
-u_int32_t s_addr; /* address in network byte order */
-};
+
struct sockaddr_in {
+
sa_family_t sin_family; /* address family: AF_INET */
+
u_int16_t sin_port; /* port in network byte order */
+
struct in_addr sin_addr; /* internet address */
+ };
+ /* Internet address. */
+ struct in_addr {
+
u_int32_t s_addr; /* address in network byte order */
+ };
''sin_family'' is always set to __AF_INET__. This is
required; in Linux 2.2 most networking functions return
@@ -114,10 +114,10 @@
''sin_addr'' is the IP host address. The ''addr''
member of __struct in_addr__ contains the host interface
address in network order. __in_addr__ should be only
-accessed using the __
inet_aton__
(3), __inet_addr__(3),
-__
inet_makeaddr__
(3) library functions or directly with
+accessed using the inet_aton(3), __inet_addr__(3),
+inet_makeaddr(3) library functions or directly with
the name resolver (see gethostbyname(3)). IPv4
addresses are divided into unicast, broadcast and multicast
addresses. Unicast addresses specify a single interface of a
host, broadcast addresses specify all hosts on a network and
@@ -187,13 +187,13 @@
control message with a packet using recvmsg(2) or
sendmsg(2).
-struct in_pktinfo {
-unsigned int ipi_ifindex; /* Interface index */
-struct in_addr ipi_spec_dst; /* Local address */
-struct in_addr ipi_addr; /* Header Destination address */
-};
+
struct in_pktinfo {
+
unsigned int ipi_ifindex; /* Interface index */
+
struct in_addr ipi_spec_dst; /* Local address */
+
struct in_addr ipi_addr; /* Header Destination address */
+ };
__ipi_ifindex__ is the unique index of the interface the
packet was received on. __ipi_spec_dst__ is the local
@@ -439,13 +439,13 @@
Join a multicast group. Argument is a __struct ip_mreqn__
structure.
-struct ip_mreqn {
-struct in_addr imr_multiaddr; /* IP multicast group address */
-struct in_addr imr_address; /* IP address of local interface */
-int imr_ifindex; /* interface index */
-};
+
struct ip_mreqn {
+
struct in_addr imr_multiaddr; /* IP multicast group address */
+
struct in_addr imr_address; /* IP address of local interface */
+
int imr_ifindex; /* interface index */
+ };
''imr_multiaddr'' contains the address of the multicast
group the application wants to join or leave. It must be a