Deleted Added
full compact
divert.4 (92238) divert.4 (117011)
1.\" $FreeBSD: head/share/man/man4/divert.4 92238 2002-03-13 18:37:40Z keramida $
1.\" $FreeBSD: head/share/man/man4/divert.4 117011 2003-06-28 23:53:39Z ru $
2.\"
3.Dd June 18, 1996
4.Dt DIVERT 4
5.Os
6.Sh NAME
7.Nm divert
8.Nd kernel packet diversion mechanism
9.Sh SYNOPSIS

--- 52 unchanged lines hidden (view full) ---

62.Xr write 2
63or
64.Xr send 2
65is used to deliver the packet, or if
66.Xr sendto 2
67is used with a destination IP address of
68.Dv INADDR_ANY ,
69then the packet is treated as if it were outgoing, i.e., destined
2.\"
3.Dd June 18, 1996
4.Dt DIVERT 4
5.Os
6.Sh NAME
7.Nm divert
8.Nd kernel packet diversion mechanism
9.Sh SYNOPSIS

--- 52 unchanged lines hidden (view full) ---

62.Xr write 2
63or
64.Xr send 2
65is used to deliver the packet, or if
66.Xr sendto 2
67is used with a destination IP address of
68.Dv INADDR_ANY ,
69then the packet is treated as if it were outgoing, i.e., destined
70for a non-local address. Otherwise, the packet is assumed to be
70for a non-local address.
71Otherwise, the packet is assumed to be
71incoming and full packet routing is done.
72.Pp
73In the latter case, the
74IP address specified must match the address of some local interface,
75or an interface name
76must be found after the IP address.
77If an interface name is found,
78that interface will be used and the value of the IP address will be
79ignored (other than the fact that it is not
80.Dv INADDR_ANY ) .
72incoming and full packet routing is done.
73.Pp
74In the latter case, the
75IP address specified must match the address of some local interface,
76or an interface name
77must be found after the IP address.
78If an interface name is found,
79that interface will be used and the value of the IP address will be
80ignored (other than the fact that it is not
81.Dv INADDR_ANY ) .
81This is to indicate on which interface the packet ``arrived.''
82This is to indicate on which interface the packet
83.Dq arrived .
82.Pp
83Normally, packets read as incoming should be written as incoming;
84.Pp
85Normally, packets read as incoming should be written as incoming;
84similarly for outgoing packets. When reading and then writing back
86similarly for outgoing packets.
87When reading and then writing back
85packets, passing the same socket address supplied by
86.Xr recvfrom 2
87unmodified to
88.Xr sendto 2
89simplifies things (see below).
90.Pp
91The port part of the socket address passed to the
92.Xr sendto 2

--- 76 unchanged lines hidden ---
88packets, passing the same socket address supplied by
89.Xr recvfrom 2
90unmodified to
91.Xr sendto 2
92simplifies things (see below).
93.Pp
94The port part of the socket address passed to the
95.Xr sendto 2

--- 76 unchanged lines hidden ---