aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/in.h
Commit message (Collapse)AuthorAgeFilesLines
* Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow.Richard Scheffenegger2020-10-091-0/+4
| | | | | | | | | | | | | | | | | | This adds a new IP_PROTO / IPV6_PROTO setsockopt (getsockopt) option IP(V6)_VLAN_PCP, which can be set to -1 (interface default), or explicitly to any priority between 0 and 7. Note that for untagged traffic, explicitly adding a priority will insert a special 801.1Q vlan header with vlan ID = 0 to carry the priority setting Reviewed by: gallatin, rrs MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D26409 Notes: svn path=/head/; revision=366569
* White space cleanup -- remove trailing tab's or spacesRandall Stewart2020-02-121-3/+3
| | | | | | | | | from any line. Sponsored by: Netflix Inc. Notes: svn path=/head/; revision=357818
* Rename IPPROTO 33 from SEP to DCCPTom Jones2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | IPPROTO 33 is DCCP in the IANA Registry: https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml IPPROTO_SEP was added about 20 years ago in r33804. The entries were added straight from RFC1700, without regard to whether they were used. The reference in RFC1700 for SEP is '[JC120] <mystery contact>', this is an indication that the protocol number was probably in use in a private network. As RFC1700 is no longer the authoritative list of internet numbers and that IANA assinged 33 to DCCP in RFC4340, change the header to the actual authoritative source. Reviewed by: Richard Scheffenegger, bz Approved by: bz (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21178 Notes: svn path=/head/; revision=350749
* Convert all IPv4 and IPv6 multicast memberships into using a STAILQHans Petter Selasky2019-06-251-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of a linear array. The multicast memberships for the inpcb structure are protected by a non-sleepable lock, INP_WLOCK(), which needs to be dropped when calling the underlying possibly sleeping if_ioctl() method. When using a linear array to keep track of multicast memberships, the computed memory location of the multicast filter may suddenly change, due to concurrent insertion or removal of elements in the linear array. This in turn leads to various invalid memory access issues and kernel panics. To avoid this problem, put all multicast memberships on a STAILQ based list. Then the memory location of the IPv4 and IPv6 multicast filters become fixed during their lifetime and use after free and memory leak issues are easier to track, for example by: vmstat -m | grep multi All list manipulation has been factored into inline functions including some macros, to easily allow for a future hash-list implementation, if needed. This patch has been tested by pho@ . Differential Revision: https://reviews.freebsd.org/D20080 Reviewed by: markj @ MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=349369
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* Correct sysctl names.Dag-Erling Smørgrav2017-08-091-1/+1
| | | | Notes: svn path=/head/; revision=322300
* Make sysctl identifiers for direct netisr queue unique.Andrey V. Elsukov2017-04-111-0/+2
| | | | | | | | | | | Introduce IPCTL_INTRDQMAXLEN and IPCTL_INTRDQDROPS macros for this purpose. Reviewed by: gnn MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10358 Notes: svn path=/head/; revision=316715
* The patch provides the same socket option as Linux IP_ORIGDSTADDR.Ermal Luçi2017-03-061-0/+2
| | | | | | | | | | | | | | | | Unfortunately they will have different integer value due to Linux value being already assigned in FreeBSD. The patch is similar to IP_RECVDSTADDR but also provides the destination port value to the application. This allows/improves implementation of transparent proxies on UDP sockets due to having the whole information on forwarded packets. Reviewed by: adrian, aw Approved by: ae (mentor) Sponsored by: rsync.net Differential Revision: D9235 Notes: svn path=/head/; revision=314722
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Remove inet_ntoa() from the kernelEric van Gyzen2017-02-161-1/+0
| | | | | | | | | | | | | | inet_ntoa() cannot be used safely in a multithreaded environment because it uses a static local buffer. Remove it from the kernel. Suggested by: glebius, emaste Reviewed by: gnn MFC after: never Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D9625 Notes: svn path=/head/; revision=313822
* Committed without approval from mentor.Ermal Luçi2017-02-121-2/+0
| | | | | | | Reported by: gnn Notes: svn path=/head/; revision=313675
* The patch provides the same socket option as Linux IP_ORIGDSTADDR.Ermal Luçi2017-02-101-0/+2
| | | | | | | | | | | | | | | Unfortunately they will have different integer value due to Linux value being already assigned in FreeBSD. The patch is similar to IP_RECVDSTADDR but also provides the destination port value to the application. This allows/improves implementation of transparent proxies on UDP sockets due to having the whole information on forwarded packets. Sponsored-by: rsync.net Differential Revision: D9235 Reviewed-by: adrian Notes: svn path=/head/; revision=313524
* Don't iterate over the ifnet addr list in ip_output()Ryan Stone2016-08-181-0/+2
| | | | | | | | | | | | | | | | | | | | | For almost every packet that is transmitted through ip_output(), a call to in_broadcast() was made to decide if the destination IP was a broadcast address. in_broadcast() iterates over the ifnet's address to find a source IP matching the subnet of the destination IP, and then checks if the IP is a broadcast in that subnet. This is completely redundant as we have already performed the route lookup, so the source IP is already known. Just use that address to directly check whether the destination IP is a broadcast address or not. MFC after: 2 months Sponsored By: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7266 Notes: svn path=/head/; revision=304435
* Provide functions to determine presence of a given addressGleb Smirnoff2015-04-171-0/+1
| | | | | | | | | | configured on a given interface. Discussed with: np Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=281649
* Kill custom in_matroute() radix mathing function removing one rte mutex lock.Alexander V. Chernikov2014-11-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially in_matrote() in_clsroute() in their current state was introduced by r4105 20 years ago. Instead of deleting inactive routes immediately, we kept them in route table, setting RTPRF_OURS flag and some expire time. After that, either GC came or RTPRF_OURS got removed on first-packet. It was a good solution in that days (and probably another decade after that) to keep TCP metrics. However, after moving metrics to TCP hostcache in r122922, most of in_rmx functionality became unused. It might had been used for flushing icmp-originated routes before rte mutexes/refcounting, but I'm not sure about that. So it looks like this is nearly impossible to make GC do its work nowadays: in_rtkill() ignores non-RTPRF_OURS routes. route can only become RTPRF_OURS after dropping last reference via rtfree() which calls in_clsroute(), which, it turn, ignores UP and non-RTF_DYNAMIC routes. Dynamic routes can still be installed via received redirect, but they have default lifetime (no specific rt_expire) and no one has another trie walker to call RTFREE() on them. So, the changelist: * remove custom rnh_match / rnh_close matching function. * remove all GC functions * partially revert r256695 (proto3 is no more used inside kernel, it is not possible to use rt_expire from user point of view, proto3 support is not complete) * Finish r241884 (similar to this commit) and remove remaining IPv6 parts MFC after: 1 month Notes: svn path=/head/; revision=274363
* Renove faith(4) and faithd(8) from base. It looks like industryAlexander V. Chernikov2014-11-091-3/+2
| | | | | | | | | | | | have chosen different (and more traditional) stateless/statuful NAT64 as translation mechanism. Last non-trivial commits to both faith(4) and faithd(8) happened more than 12 years ago, so I assume it is time to drop RFC3142 in FreeBSD. No objections from: net@ Notes: svn path=/head/; revision=274331
* Add support for receiving and setting flowtype, flowid and RSS bucketAdrian Chadd2014-09-091-0/+2
| | | | | | | | | | | | | | | | information as part of recvmsg(). This is primarily used for debugging/verification of the various processing paths in the IP, PCB and driver layers. Unfortunately the current implementation of the control message path results in a ~10% or so drop in UDP frame throughput when it's used. Differential Revision: https://reviews.freebsd.org/D527 Reviewed by: grehan Notes: svn path=/head/; revision=271293
* Oops - somehow I missed the IP option numbers clashing with the multicastAdrian Chadd2014-07-171-4/+5
| | | | | | | | | numbers below. Move them to a new set of non-clashing numbers. Notes: svn path=/head/; revision=268788
* Implement the first stage of multi-bind listen sockets and RSS socketAdrian Chadd2014-07-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | awareness. * Introduce IP_BINDMULTI - indicating that it's okay to bind multiple sockets on the same bind details. Although the PCB code has been taught about this (see below) this patch doesn't introduce the rest of the PCB changes necessary to distribute lookups among multiple PCB entries in the global wildcard table. * Introduce IP_RSS_LISTEN_BUCKET - placing an listen socket into the given RSS bucket (and thus a single PCBGROUP hash.) * Modify the PCB add path to be aware of IP_BINDMULTI: + Only allow further PCB entries to be added if the owner credentials and IP_BINDMULTI has been specified. Ie, only allow further IP_BINDMULTI sockets to appear if the first bind() was IP_BINDMULTI. * Teach the PCBGROUP code about IP_RSS_LISTE_BUCKET marked PCB entries. Instead of using the wildcard logic and hashing, these sockets are simply placed into the PCBGROUP and _not_ in the wildcard hash. * When doing a PCBGROUP lookup, also do a wildcard match as well. This allows for an RSS bucket PCB entry to appear in a PCBGROUP rather than having to exist in the wildcard list. Tested: * TCP IPv4 server testing with igb(4) * TCP IPv4 server testing with ix(4) TODO: * The pcbgroup lookup code duplicated the wildcard and wildcard-PCB logic. This could be refactored into a single function. * This doesn't yet work for IPv6 (The PCBGROUP code in netinet6/ doesn't yet know about this); nor does it yet fully work for UDP. Notes: svn path=/head/; revision=268479
* Retire IP_RSSCPUID ; the right thing to do is query the RSS bucket;Adrian Chadd2014-06-261-3/+4
| | | | | | | | | | | | map the bucket to an RSS queue, then map the queue to a CPU ID. This way the bucket->queue and queue->CPU mapping can change over time. Introduce IP_RSSBUCKETID - which instead looks up the RSS bucket. User applications can then map the RSS bucket to a CPU. Notes: svn path=/head/; revision=267895
* netinet/in.h: Expose htonl(), htons(), ntohl() and ntohs() in strict POSIXJilles Tjoelker2014-05-291-2/+2
| | | | | | | | | | | | | | | | | | mode. Put the htonl(), htons(), ntohl() and ntohs() declarations under __POSIX_VISIBLE >= 200112. POSIX.1-2001 and newer require these to be exposed from <netinet/in.h> (as well as <arpa/inet.h>). Note that it may be unnecessary to check __POSIX_VISIBLE >= 200112 because older versions of POSIX and the C standard do not define this header. However, other places in the same file already perform the check. PR: 188316 Submitted by: Christian Neukirchen Notes: svn path=/head/; revision=266842
* Reserve IP_FLOWID, IP_FLOWTYPE, IP_RSSCPUID socket option IDs forAdrian Chadd2014-05-171-0/+3
| | | | | | | | | | | near-term future use. These are intended to fetch the current flow id, flow hash type (M_HASHTYPE_* from the sys/mbuf.h) and if RSS is enabled, the RSS destined CPU ID for the receive path. Notes: svn path=/head/; revision=266276
* Add support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks.Kevin Lo2014-04-071-0/+1
| | | | | | | | | | | Tested with vlc and a test suite [1]. [1] http://www.erg.abdn.ac.uk/~gerrit/udp-lite/files/udplite_linux.tar.gz Reviewed by: jhb, glebius, adrian Notes: svn path=/head/; revision=264212
* Remove more constants related to static sysctl nodes. The MAXID constantsJohn Baldwin2014-02-251-9/+1
| | | | | | | | | | | were primarily used to size the sysctl name list macros that were removed in r254295. A few other constants either did not have an associated sysctl node, or the associated node used OID_AUTO instead. PR: ports/184525 (exp-run) Notes: svn path=/head/; revision=262489
* Add more (IPv6) related Internet Protocols:Bjoern A. Zeeb2013-12-251-0/+4
| | | | | | | | | | | | | | | | | | - Host Identity Protocol (RFC5201) - Shim6 Protocol (RFC5533) - 2x experimentation and testing (RFC3692, RFC4727) This does not indicate interest to implement/support these protocols, but they are part of the "IPv6 Extension Header Types" [1] based on RFC7045 and might thus be needed by filtering and next header parsing implementations. References: [1] http://www.iana.org/assignments/ipv6-parameters Obtained from: http://www.iana.org/assignments/protocol-numbers MFC after: 1 week Notes: svn path=/head/; revision=259887
* Finish r254925 and remove the last remaining sysctl name list macro. TheJohn Baldwin2013-10-231-72/+0
| | | | | | | | one port that used it has been fixed to use the more portable getprotoent(3) instead. Notes: svn path=/head/; revision=256962
* - Add parentheses to all internet addressesKevin Lo2013-10-191-26/+26
| | | | | | | | | | - All the casts to uint32_t should be to in_addr_t Suggested by: bde Reviewed by: bde Notes: svn path=/head/; revision=256772
* Treat INADDR_NONE as uint32_t.Kevin Lo2013-10-151-1/+1
| | | | | | | Reviewed by: glebius Notes: svn path=/head/; revision=256505
* Remove most of the remaining sysctl name list macros. They were onlyJohn Baldwin2013-08-261-18/+0
| | | | | | | | | | | ever intended for use in sysctl(8) and it has not used them for many years. Reviewed by: bde Tested by: exp-run by bdrewery Notes: svn path=/head/; revision=254925
* Move IPPROTO_IPV6 from #ifdef __BSD_VISIBLE to #if __POSIX_VISIBLE >= 201112Colin Percival2013-04-271-1/+1
| | | | | | | | | | | since POSIX 2001 states that it shall be defined. Reported by: sbruno Reviewed by: jilles MFC after: 1 week Notes: svn path=/head/; revision=250000
* Switch the entire IPv4 stack to keep the IP packet headerGleb Smirnoff2012-10-221-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | in network byte order. Any host byte order processing is done in local variables and host byte order values are never[1] written to a packet. After this change a packet processed by the stack isn't modified at all[2] except for TTL. After this change a network stack hacker doesn't need to scratch his head trying to figure out what is the byte order at the given place in the stack. [1] One exception still remains. The raw sockets convert host byte order before pass a packet to an application. Probably this would remain for ages for compatibility. [2] The ip_input() still subtructs header len from ip->ip_len, but this is planned to be fixed soon. Reviewed by: luigi, Maxim Dounin <mdounin mdounin.ru> Tested by: ray, Olivier Cochard-Labbe <olivier cochard.me> Notes: svn path=/head/; revision=241913
* Add a IP_RECVTOS socket option to receive for received UDP/IPv4Michael Tuexen2012-06-121-0/+1
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=236959
* Add IPPROTO_MPLS (rfc4023) IP protocol definitionEd Maste2012-05-271-0/+1
| | | | | | | | | There are currently no in-tree consumers; I'm adding it now for use by vendor code. This matches the change OpenBSD made while implementing MPLS in gif(4). Notes: svn path=/head/; revision=236157
* Add support for IPv4 /31 prefixes, as described in RFC3021.Gleb Smirnoff2011-10-151-0/+2
| | | | | | | | | | To run a /31 network, participating hosts MUST drop support for directed broadcasts, and treat the first and last addresses on subnet as unicast. The broadcast address for the prefix should be the link local broadcast address, INADDR_BROADCAST. Notes: svn path=/head/; revision=226402
* Make the RPC specific __rpc_inet_ntop() and __rpc_inet_pton() generalAttilio Rao2010-09-241-0/+2
| | | | | | | | | | | | | in the kernel (just as inet_ntoa() and inet_aton()) are and sync their prototype accordingly with already mentioned functions. Sponsored by: Sandvine Incorporated Reviewed by: emaste, rstone Approved by: dfr MFC after: 2 weeks Notes: svn path=/head/; revision=213103
* MFp4: anchie_soc2009 branch:Ana Kukec2010-08-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Add kernel side support for Secure Neighbor Discovery (SeND), RFC 3971. The implementation consists of a kernel module that gets packets from the nd6 code, sends them to user space on a dedicated socket and reinjects them back for further processing. Hooks are used from nd6 code paths to divert relevant packets to the send implementation for processing in user space. The hooks are only triggered if the send module is loaded. In case no user space application is connected to the send socket, processing continues normaly as if the module would not be loaded. Unloading the module is not possible at this time due to missing nd6 locking. The native SeND socket is similar to a raw IPv6 socket but with its own, internal pseudo-protocol. Approved by: bz (mentor) Notes: svn path=/head/; revision=211501
* Add definition of IPv6 mobility header's protocol number, as assigned byXin LI2010-03-311-0/+1
| | | | | | | | | IANA and defined in RFC 3775. Obtained from: KAME Notes: svn path=/head/; revision=206022
* bring in several cleanups tested in ipfw3-head branch, namely:Luigi Rizzo2009-12-281-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r201011 - move most of ng_ipfw.h into ip_fw_private.h, as this code is ipfw-specific. This removes a dependency on ng_ipfw.h from some files. - move many equivalent definitions of direction (IN, OUT) for reinjected packets into ip_fw_private.h - document the structure of the packet tags used for dummynet and netgraph; r201049 - merge some common code to attach/detach hooks into a single function. r201055 - remove some duplicated code in ip_fw_pfil. The input and output processing uses almost exactly the same code so there is no need to use two separate hooks. ip_fw_pfil.o goes from 2096 to 1382 bytes of .text r201057 (see the svn log for full details) - macros to make the conversion of ip_len and ip_off between host and network format more explicit r201113 (the remaining parts) - readability fixes -- put braces around some large for() blocks, localize variables so the compiler does not think they are uninitialized, do not insist on precise allocation size if we have more than we need. r201119 - when doing a lookup, keys must be in big endian format because this is what the radix code expects (this fixes a bug in the recently-introduced 'lookup' option) No ABI changes in this commit. MFC after: 1 week Notes: svn path=/head/; revision=201122
* Add new sockopt names for ipfw and dummynet.Luigi Rizzo2009-12-021-0/+8
| | | | | | | | | | | This commit is just grabbing entries for the new names that will be used in the future, so you don't need to rebuild anything now. MFC after: 3 days Notes: svn path=/head/; revision=200023
* Move inet_aton() (specular to inet_ntoa(), already present in libkern)Attilio Rao2009-11-121-0/+1
| | | | | | | | | | | into libkern in order to made it usable by other modules than alias_proxy. Obtained from: Sandvine Incorporated Sponsored by: Sandvine Incorporated MFC: 1 week Notes: svn path=/head/; revision=199208
* Move the duplicate definition of struct sockaddr_storage to its ownPoul-Henning Kamp2009-09-081-21/+1
| | | | | | | | | | include file, and include this where the previous duplicate definitions were. Static program checkers like FlexeLint rightfully take a dim view of duplicate definitions, even if they currently are identical. Notes: svn path=/head/; revision=196967
* - Rename IP_NONLOCALOK IP socket option to IP_BINDANY, to be more consistentPawel Jakub Dawidek2009-06-011-2/+1
| | | | | | | | | | | | | | | | with OpenBSD (and BSD/OS originally). We can't easly do it SOL_SOCKET option as there is no more space for more SOL_SOCKET options, but this option also fits better as an IP socket option, it seems. - Implement this functionality also for IPv6 and RAW IP sockets. - Always compile it in (don't use additional kernel options). - Remove sysctl to turn this functionality on and off. - Introduce new privilege - PRIV_NETINET_BINDANY, which allows to use this functionality (currently only unjail root can use it). Discussed with: julian, adrian, jhb, rwatson, kmacy Notes: svn path=/head/; revision=193217
* Namespace: Defining htonl() and friends here instead of arpa/inet.h isDavid Schultz2009-03-141-2/+2
| | | | | | | a BSD extension. Notes: svn path=/head/; revision=189829
* Merge IGMPv3 and Source-Specific Multicast (SSM) to the FreeBSDBruce M Simpson2009-03-091-0/+1
| | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=189592
* Add various defines/macros required by IGMPv3:Bruce M Simpson2009-03-041-1/+10
| | | | | | | | | | | * MCAST_UNDEFINED state. * in_allhosts() macro (group is 224.0.0.1). This uses a const endian comparison. * IP_MAX_GROUP_SRC_FILTER, IP_MAX_SOCK_SRC_FILTER default resource limits. Notes: svn path=/head/; revision=189346
* Better comment what the socket option does. Thanks to Sam LefflerAdrian Chadd2009-01-091-1/+2
| | | | | | | for suggesting this. Notes: svn path=/head/; revision=186960
* Implement a new IP option (not compiled/enabled by default) to allowAdrian Chadd2009-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | applications to specify a non-local IP address when bind()'ing a socket to a local endpoint. This allows applications to spoof the client IP address of connections if (obviously!) they somehow are able to receive the traffic normally destined to said clients. This patch doesn't include any changes to ipfw or the bridging code to redirect the client traffic through the PCB checks so TCP gets a shot at it. The normal behaviour is that packets with a non-local destination IP address are not handled locally. This can be dealth with some IPFW hackery; modifications to IPFW to make this less hacky will occur in subsequent commmits. Thanks to Julian Elischer and others at Ironport. This work was approved and donated before Cisco acquired them. Obtained from: Julian Elischer and others MFC after: 2 weeks Notes: svn path=/head/; revision=186955
* Rather than using hidden includes (with cicular dependencies),Bjoern A. Zeeb2008-12-021-4/+0
| | | | | | | | | | | | | | directly include only the header files needed. This reduces the unneeded spamming of various headers into lots of files. For now, this leaves us with very few modules including vnet.h and thus needing to depend on opt_route.h. Reviewed by: brooks, gnn, des, zec, imp Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=185571
* Step 1.5 of importing the network stack virtualization infrastructureMarko Zec2008-10-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the vimage project, as per plan established at devsummit 08/08: http://wiki.freebsd.org/Image/Notes200808DevSummit Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator macros, and CURVNET_SET() context setting macros, all currently resolving to NOPs. Prepare for virtualization of selected SYSCTL objects by introducing a family of SYSCTL_V_*() macros, currently resolving to their global counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT(). Move selected #defines from sys/sys/vimage.h to newly introduced header files specific to virtualized subsystems (sys/net/vnet.h, sys/netinet/vinet.h etc.). All the changes are verified to have zero functional impact at this point in time by doing MD5 comparision between pre- and post-change object files(*). (*) netipsec/keysock.c did not validate depending on compile time options. Implemented by: julian, bz, brooks, zec Reviewed by: julian, bz, brooks, kris, rwatson, ... Approved by: julian (mentor) Obtained from: //depot/projects/vimage-commit2/... X-MFC after: never Sponsored by: NLnet Foundation, The FreeBSD Foundation Notes: svn path=/head/; revision=183550
* Clean up the code that checks the types of address so that it isGeorge V. Neville-Neil2008-04-171-0/+2
| | | | | | | | | | | | | | done by understandable macros. Fix the bug that prevented the system from responding on interfaces with link local addresses assigned. PR: 120958 Submitted by: James Snow <snow at teardrop.org> MFC after: 2 weeks Notes: svn path=/head/; revision=178280