Commit Graph

64 Commits

Author SHA1 Message Date
Gleb Smirnoff
5b0ae76514 Fix type in last commit.
Submitted by:	brueffer
2012-10-12 19:53:13 +00:00
Gleb Smirnoff
cfccce310a Be more explicit on how "intact" incoming packets in raw sockets are. 2012-10-12 12:27:30 +00:00
Gleb Smirnoff
e8574be32c Redo r240386 providing more correct information. 2012-09-20 05:49:31 +00:00
Gleb Smirnoff
f99a2a0c2b Document conditions for IP_SENDSRCADDR socket option.
Obtained from:	r167342 commit message
2012-09-12 10:09:34 +00:00
Ruslan Ermilov
67a3f4b2a0 Fixed an example that set IP_ONESBCAST socket option to actually work,
and not return EINVAL.
2012-06-15 09:12:47 +00:00
Michael Tuexen
3cca425b29 Add a IP_RECVTOS socket option to receive for received UDP/IPv4
packets a cmsg of type IP_RECVTOS which contains the TOS byte.
Much like IP_RECVTTL does for TTL. This allows to implement a
protocol on top of UDP and implementing ECN.

MFC after: 3 days
2012-06-12 14:02:38 +00:00
Michael Tuexen
30852968ef The cmsg_len field includes the cmsg header. So use CMSG_LEN().
MFC after: 3 days
2012-06-05 20:48:13 +00:00
Glen Barber
50d922a02e General mdoc(7) and typo fixes.
PR:		167776
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-12 03:25:46 +00:00
Joel Dahl
3030137a23 Remove superfluous paragraph macro. 2012-03-24 13:37:57 +00:00
Andre Oppermann
c53bbc074e mdoc fix for r227499.
Reported by:	brueffer
2011-11-14 15:57:03 +00:00
Andre Oppermann
9538693040 Note the ip_len bug fixed in r226105 in the BUGS section. 2011-11-14 15:10:42 +00:00
Joel Dahl
c2025a7660 Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages.  Minor corrections by me.

Submitted by:	Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
2010-08-16 15:18:30 +00:00
Pawel Jakub Dawidek
79d6b3f34a Document IP_BINDANY IP socket option.
Reviewed by:	brueffer
2009-06-01 10:30:52 +00:00
Bruce M Simpson
d10910e6ce Merge IGMPv3 and Source-Specific Multicast (SSM) to the FreeBSD
IPv4 stack.

Diffs are minimized against p4.
PCS has been used for some protocol verification, more widespread
testing of recorded sources in Group-and-Source queries is needed.
sizeof(struct igmpstat) has changed.

__FreeBSD_version is bumped to 800070.
2009-03-09 17:53:05 +00:00
Bruce M Simpson
108ad5bd51 Add source-specific multicast (SSM) option documentation. 2009-03-04 02:00:14 +00:00
Bruce M Simpson
71498f308b Import rewrite of IPv4 socket multicast layer to support source-specific
and protocol-independent host mode multicast. The code is written to
accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work.

This change only pertains to FreeBSD's use as a multicast end-station and
does not concern multicast routing; for an IGMPv3/MLDv2 router
implementation, consider the XORP project.

The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6,
which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html

Summary
 * IPv4 multicast socket processing is now moved out of ip_output.c
   into a new module, in_mcast.c.
 * The in_mcast.c module implements the IPv4 legacy any-source API in
   terms of the protocol-independent source-specific API.
 * Source filters are lazy allocated as the common case does not use them.
   They are part of per inpcb state and are covered by the inpcb lock.
 * struct ip_mreqn is now supported to allow applications to specify
   multicast joins by interface index in the legacy IPv4 any-source API.
 * In UDP, an incoming multicast datagram only requires that the source
   port matches the 4-tuple if the socket was already bound by source port.
   An unbound socket SHOULD be able to receive multicasts sent from an
   ephemeral source port.
 * The UDP socket multicast filter mode defaults to exclusive, that is,
   sources present in the per-socket list will be blocked from delivery.
 * The RFC 3678 userland functions have been added to libc: setsourcefilter,
   getsourcefilter, setipv4sourcefilter, getipv4sourcefilter.
 * Definitions for IGMPv3 are merged but not yet used.
 * struct sockaddr_storage is now referenced from <netinet/in.h>. It
   is therefore defined there if not already declared in the same way
   as for the C99 types.
 * The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF
   which are then interpreted as interface indexes) is now deprecated.
 * A patch for the Rhyolite.com routed in the FreeBSD base system
   is available in the -net archives. This only affects individuals
   running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces.
 * Make IPv6 detach path similar to IPv4's in code flow; functionally same.
 * Bump __FreeBSD_version to 700048; see UPDATING.

This work was financially supported by another FreeBSD committer.

Obtained from:  p4://bms_netdev
Submitted by:   Wilbert de Graaf (original work)
Reviewed by:    rwatson (locking), silence from fenner,
		net@ (but with encouragement)
2007-06-12 16:24:56 +00:00
Bruce M Simpson
04bcf5a9be Document a major IGMP related annoyance.
Add comments about IGMP bits which will go when we take SSM.
Xref multicast(4).

MFC after:	3 days
2007-03-18 15:31:06 +00:00
Bruce M Simpson
2413531434 Don't quote IP_MAX_MEMBERSHIPS as 20 any more. 2006-05-14 14:13:30 +00:00
Ruslan Ermilov
78ad54210f -mdoc sweep. 2005-11-18 10:56:28 +00:00
Andre Oppermann
c9ebaafaa1 Document the IP_DONTFRAG IP socket option.
Sponsored by:   TCP/IP Optimization Fundraise 2005
2005-09-26 20:58:49 +00:00
Andre Oppermann
5090c7544f Document IP_MINTTL socket option.
MFC after:	2 weeks
Sponsored by:	TCP/IP Optimization Fundraise 2005
2005-08-22 16:14:53 +00:00
Maxim Konovalov
6ee79c59d2 o Document net.inet.ip.portrange.random* sysctls.
o Correct a comment about random port allocation threshold
implementation.

Reviewed by:	silby, ru
MFC after:	3 days
2005-03-23 09:26:38 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
5c8e5f2462 Fixed xrefs. 2005-01-21 10:35:40 +00:00
Mike Pritchard
c48524c2aa Spelling fixes. 2004-06-21 17:42:49 +00:00
Ruslan Ermilov
bf7f20c2b6 Assorted markup, spelling, and grammar fixes. 2004-06-16 08:33:57 +00:00
Bruce M Simpson
26c3ef5325 Document the behaviour of IP_ADD_MEMBERSHIP as per RFC 1724.
PR:		bin/51927
2004-06-16 05:04:17 +00:00
Bruce M Simpson
538a4c1f75 mdoc(7) police
Submitted by:	ru
2004-06-15 16:48:42 +00:00
Bruce M Simpson
6f5bc70a3f Add a paragraph about the importance of byte order when using raw
sockets with the IP_HDRINCL option.
Add a list entry about the errors which IP_HDRINCL can return.
Bump .Dd.

PR:		docs/30873
Submitted by:	Douglas De Couto
Obtained from:	BSD/OS (byte order), some old libnet stuff I did years ago.
2004-06-15 01:08:09 +00:00
Mike Silbersack
fe9892eabd Document the net.inet.ip.portrange.randomized sysctl. 2004-04-22 08:49:51 +00:00
Bruce M Simpson
8afa230470 Add the IP_ONESBCAST option, to enable undirected IP broadcasts to be sent on
specific interfaces. This is required by aodvd, and may in future help us
in getting rid of the requirement for BPF from our import of isc-dhcp.

Suggested by:   fenestro
Obtained from:  BSD/OS
Reviewed by:    mini, sam
Approved by:    jake (mentor)
2003-08-20 14:46:40 +00:00
Ruslan Ermilov
8d22ff7521 Add missing markup bits. 2003-05-20 22:07:55 +00:00
Matthew N. Dodd
4957466b8e IP_RECVTTL socket option.
Reviewed by:	Stuart Cheshire <cheshire@apple.com>
2003-04-29 21:36:18 +00:00
Matthew N. Dodd
3b5f87e60d Document the IP_RECVIF socket option.
Submitted by:	 Bruce M Simpson
2003-04-29 08:37:52 +00:00
Matthew N. Dodd
2c56e246fa Back out support for RFC3514.
RFC3514 poses an unacceptale risk to compliant systems.
2003-04-02 20:14:44 +00:00
Matthew N. Dodd
09139a4537 Implement support for RFC 3514 (The Security Flag in the IPv4 Header).
(See: ftp://ftp.rfc-editor.org/in-notes/rfc3514.txt)

This fulfills the host requirements for userland support by
way of the setsockopt() IP_EVIL_INTENT message.

There are three sysctl tunables provided to govern system behavior.

	net.inet.ip.rfc3514:

		Enables support for rfc3514.  As this is an
		Informational RFC and support is not yet widespread
		this option is disabled by default.

	net.inet.ip.hear_no_evil

		 If set the host will discard all received evil packets.

	net.inet.ip.speak_no_evil

		If set the host will discard all transmitted evil packets.

The IP statistics counter 'ips_evil' (available via 'netstat') provides
information on the number of 'evil' packets recieved.

For reference, the '-E' option to 'ping' has been provided to demonstrate
and test the implementation.
2003-04-01 08:21:44 +00:00
Ruslan Ermilov
ace5be682d mdoc(7) police: Scheduled sweep. 2003-02-24 22:53:26 +00:00
Crist J. Clark
718b17bb6a Document the net.inet.ip.portrange.reserved{high,low} sysctl knobs
added in sys/netinet/in_pcb.c 1.120.

Prodded by:	ru
2003-02-21 21:09:35 +00:00
Ian Dowse
c557ae16ce Implement a new IP_SENDSRCADDR ancillary message type that permits
a server process bound to a wildcard UDP socket to select the IP
address from which outgoing packets are sent on a per-datagram
basis. When combined with IP_RECVDSTADDR, such a server process can
guarantee to reply to an incoming request using the same source IP
address as the destination IP address of the request, without having
to open one socket per server IP address.

Discussed on:	-net
Approved by:	re
2002-10-21 20:40:02 +00:00
Mike Silbersack
74c0361a9d Update ip(4) manpage to reflect recent ephemeral port range
change.

Noticed by:	ru
MFC after:	1 day
2002-04-09 18:03:18 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Jens Schweikhardt
c1f3e4bf21 Removed whitespace at end-of-line; no content changes. I simply did
cd src/share; find man[1-9] -type f|xargs perl -pi -e 's/[ \t]+$//'

BTW, what editors are the culprits? I'm using vim and it shows
me whitespace at EOL in troff files with a thick blue block...

Reviewed by:	Silence from cvs diff -b
MFC after:	7 days
2001-07-14 19:41:16 +00:00
Dima Dorfman
ef0180ed69 mdoc(7) police: rename the DIAGNOSTICS section to ERRORS to match the
content, and correct the parameters to the -tag list therein.

Reviewed by:	ru
2001-04-13 19:49:07 +00:00
Ben Smithurst
8f5e8232e8 Correct the description of the "low" (< 1024) port range.
PR:		25500
Submitted by:	Barry Irwin <bvi@devco.net>
2001-03-29 01:00:42 +00:00
Ruslan Ermilov
8ce3f3dd28 Make it possible to use IP_TTL and IP_TOS setsockopt(2) options
on certain types of SOCK_RAW sockets.  Also, use the ip.ttl MIB
variable instead of MAXTTL constant as the default time-to-live
value for outgoing IP packets all over the place, as we already
do this for TCP and UDP.

Reviewed by:	wollman
2001-03-09 12:22:51 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Ben Smithurst
aabbf63eef Fix typo; s/demon/daemon/
PR:		22955, 22956
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-20 10:15:38 +00:00
Ruslan Ermilov
e30177e024 Follow BSD/OS and NetBSD, keep the ip_id field in network order all the time.
Requested by:	wollman
2000-09-14 14:42:04 +00:00
Sheldon Hearn
9c13074187 Add a missing article. 2000-09-01 13:06:57 +00:00
Ruslan Ermilov
03b34269aa `ip_id' now expected in host byte order when IP_HDRINCL is in use. 2000-09-01 12:37:11 +00:00