summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pritchard <mpp@FreeBSD.org>1997-01-30 23:49:46 +0000
committerMike Pritchard <mpp@FreeBSD.org>1997-01-30 23:49:46 +0000
commit0c3a17466f8dccb224706cc16a6a176ad12bbd4a (patch)
tree16cfa800b99c15633b89383b28eccd13cb3c5b53
parent453196eb04d88ed1bc05b91f47e08e81facc7c35 (diff)
downloadsrc-test2-0c3a17466f8dccb224706cc16a6a176ad12bbd4a.tar.gz
src-test2-0c3a17466f8dccb224706cc16a6a176ad12bbd4a.zip
Notes
-rw-r--r--share/man/man4/bpf.419
-rw-r--r--share/man/man4/inet.43
-rw-r--r--share/man/man4/ip.420
3 files changed, 22 insertions, 20 deletions
diff --git a/share/man/man4/bpf.4 b/share/man/man4/bpf.4
index 12648ff2637a..5a05f6a1306b 100644
--- a/share/man/man4/bpf.4
+++ b/share/man/man4/bpf.4
@@ -201,11 +201,11 @@ indicating no timeout.
Returns the following structure of packet statistics:
.Bd -literal
struct bpf_stat {
- u_int bs_recv;
- u_int bs_drop;
+ u_int bs_recv; /* number of packets received */
+ u_int bs_drop; /* number of packets dropped */
};
.Ed
-
+.Pp
The fields are:
.Bl -hang -offset indent
.It Li bs_recv
@@ -265,7 +265,7 @@ struct bpf_version {
u_short bv_minor;
};
.Ed
-
+.Pp
The current version numbers are given by
.Dv BPF_MAJOR_VERSION
and
@@ -281,10 +281,11 @@ The following structure is prepended to each packet returned by
.Xr read 2 :
.Bd -literal
struct bpf_hdr {
- struct timeval bh_tstamp;
- u_long bh_caplen;
- u_long bh_datalen;
- u_short bh_hdrlen;
+ struct timeval bh_tstamp; /* time stamp */
+ u_long bh_caplen; /* length of captured portion */
+ u_long bh_datalen; /* original length of packet */
+ u_short bh_hdrlen; /* length of bpf header (this struct
+ plus alignment padding */
};
.Ed
.Pp
@@ -365,7 +366,7 @@ struct bpf_insn {
u_short code;
u_char jt;
u_char jf;
- long k;
+ u_long k;
};
.Ed
diff --git a/share/man/man4/inet.4 b/share/man/man4/inet.4
index d25c14bfaa64..3b32c4f424da 100644
--- a/share/man/man4/inet.4
+++ b/share/man/man4/inet.4
@@ -70,7 +70,8 @@ Sockets bound to the Internet protocol family utilize
the following addressing structure,
.Bd -literal -offset indent
struct sockaddr_in {
- short sin_family;
+ u_char sin_len;
+ u_char sin_family;
u_short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4
index 12ffbb23197e..467fcca91806 100644
--- a/share/man/man4/ip.4
+++ b/share/man/man4/ip.4
@@ -188,7 +188,7 @@ in order to control the scope of the multicasts:
u_char ttl; /* range: 0 to 255, default = 1 */
setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));
.Ed
-.sp
+.Pp
Datagrams with a TTL of 1 are not forwarded beyond the local network.
Multicast datagrams with a TTL of 0 will not be transmitted on any network,
but may be delivered locally if the sending host belongs to the destination
@@ -206,7 +206,7 @@ subsequent transmissions from a given socket:
struct in_addr addr;
setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &addr, sizeof(addr));
.Ed
-.sp
+.Pp
where "addr" is the local
.Tn IP
address of the desired interface or
@@ -231,7 +231,7 @@ over whether or not subsequent datagrams are looped back:
u_char loop; /* 0 = disable, 1 = enable (default) */
setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop));
.Ed
-.sp
+.Pp
This option
improves performance for applications that may have no more than one
instance on a single host (such as a router demon), by eliminating
@@ -253,17 +253,17 @@ option:
struct ip_mreq mreq;
setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
.Ed
-.sp
+.Pp
where
.Fa mreq
is the following structure:
.Bd -literal
struct ip_mreq {
- struct in_addr imr_multiaddr; /* multicast group to join */
- struct in_addr imr_interface; /* interface to join on */
+ struct in_addr imr_multiaddr; /* IP multicast address of group */
+ struct in_addr imr_interface; /* local IP address of interface */
}
.Ed
-.sp
+.Pp
.Dv imr_interface
should
be
@@ -286,7 +286,7 @@ To drop a membership, use:
struct ip_mreq mreq;
setsockopt(s, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq));
.Ed
-.sp
+.Pp
where
.Fa mreq
contains the same values as used to add the membership.
@@ -349,7 +349,7 @@ type.
int hincl = 1; /* 1 = on, 0 = off */
setsockopt(s, IPPROTO_IP, IP_HDRINCL, &hincl, sizeof(hincl));
.Ed
-.sp
+.Pp
Unlike previous
.Tn BSD
releases, the program must set all
@@ -360,7 +360,7 @@ ip->ip_hl = hlen >> 2;
ip->ip_id = 0; /* 0 means kernel set appropriate value */
ip->ip_off = offset;
.Ed
-.sp .5
+.Pp
If the header source address is set to
.Dv INADDR_ANY,
the kernel will choose an appropriate address.