summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* add IPPROTO_SCTP, ok claudio@sthen2021-01-181-1/+2
|
* Extend IP_ADD_MEMBERSHIP to also support struct ip_mreqn.claudio2021-01-071-1/+7
| | | | | | | struct ip_mreqn allows to use the interface index to select the interface for multicast packets which makes it possible to use this with unnumbered interfaces. OK dlg@ robert@
* Convert ip_sysctl to sysctl_bounded_argsgnezdo2020-08-221-45/+1
|
* remove mobileip(4)dlg2019-11-041-2/+2
| | | | | | | noone seems to use it, and we should not encourage people to use it by having it available. it's been disabled for most of the last release and noones asked for it in 6.6, so i'm taking that as an ok for this removal.
* make whitespace in the IPPROTO defines consistent. no functional change.dlg2019-10-251-13/+13
|
* +#define IPPROTO_UDPLITE 136, as per RFC 3828 and the IANA allocationdlg2019-10-251-1/+2
| | | | | please don't interpret this as an intention on my part to implement UDP-Lite.
* Kernel is missing propper input validation when configuring addresses.bluhm2019-10-231-1/+2
| | | | | | Fix the SIOCAIFADDR and SIOCDIFADDR ioctl(2) by implementing in_sa2sin() to validate inet address family and address length. OK visa@
* Expose net.inet.ip.arpq.drops to help debug what's going on when a lotflorian2018-10-131-2/+5
| | | | | | | of packets are being dropped but non of the other counters are increasing. From Daniel Hokka Zakrisson (daniel AT hozac DOT com), thanks! OK florian, phessler
* Convert inetctlerrmap to u_char like inet6ctlerrmap. That is alsobluhm2018-09-111-3/+3
| | | | | what FreeBSD does. Remove old #if 0 version of inet6ctlerrmap. OK mpi@
* Introduce new IPsec (per-CPU) statistics and refactor ESP inputmpi2018-07-101-3/+4
| | | | | | | | | | callbacks to be able to count dropped packet. Having more generic statistics will help troubleshooting problems with specific tunnels. Per-TDB counters are coming once all the refactoring bits are in. ok markus@
* The global zero addresses must not change, mark them constant.bluhm2018-06-071-2/+2
| | | | OK tb@ visa@
* Revert all the bits of the autocreate 127.0.0.1 on lo(4) creation for now.claudio2018-03-021-2/+1
| | | | This needs to go back to the drawing board.
* Similar to the IPv6 case create 127.0.0.1/8 on lo(4) interfaces which actclaudio2018-02-101-1/+2
| | | | | | | as loopback interfaces for each rdomain (including lo0). This is done when the interface is brought up. This is now also done by default (either on attach of lo0 or when creating the rdomain). OK mpi@
* Sprinkle some NET_ASSERT_LOCKED(), const and co to prepare runningmpi2017-11-201-2/+2
| | | | | | pr_input handlers without KERNEL_LOCK(). ok visa@
* Introduce ipsec_sysctl() and move IPsec tunables where they belong.mpi2017-11-141-13/+13
| | | | ok bluhm@, visa@
* Kill the divert-packet socket option IP_DIVERTFL to filter packets.bluhm2017-10-061-6/+1
| | | | | | | | It used a loop over the global list divbtable that would be hard to make MP safe. The port net/dnsfilter does not work without this, it should be converted to divert-to. Neither other ports nor base use this filter feature. ports checked by sthen@; OK mpi@ benno@
* Validate sockaddr from userland in central functions. This resultsbluhm2017-08-111-1/+2
| | | | | | | in common checks for unix, inet, inet6 instead of partial checks here and there. Some checks are already done at a higher layer, but better be paranoid with user input. OK claudio@ millert@
* Introduce ipv{4,6}_input(), two wrappers around IP queues.mpi2017-05-301-2/+3
| | | | | | | This will help transitionning to an un-KERNEL_LOCK()ed IP forwarding path. Disucssed with bluhm@, ok claudio@
* Introduce sstosa() for converting sockaddr_storage with a type safebluhm2017-05-041-4/+4
| | | | | | | inline function instead of casting it to sockaddr. While there, use inline instead of __inline for all these conversions. Some struct sockaddr casts can be avoided completely. OK dhill@ mpi@
* Move the typedefs for in_{addr,port}_t from <sys/types.h> toguenther2017-02-041-1/+7
| | | | | | | <netinet/in.h> and <arpa/inet.h> ok and ports test naddy@ (thanks!) ok krw@ beck@ millert@
* Remove PIM support from the multicast stack.rzalamena2016-12-221-2/+2
| | | | ok mpi@
* Implement a sockaddr_ntop() function that works like inet_ntop() but printsclaudio2016-09-041-6/+6
| | | | | sockaddrs. Works for all sockaddrs so can be used to print sockaddrs nicely. OK phessler@
* Add IP_SENDSRCADDR cmsg for UDP sockets. As suggested by sthen@,vgross2016-08-161-1/+3
| | | | | | IP_SENDSRCADDR == IP_RECVDSTADDR. OK sthen@ jca@ bluhm@
* Add sysctl for arp timers: net.inet.ip.arptimeout (expire timer for resolvedchris2016-06-281-2/+8
| | | | | | entries) and net.inet.ip.arpdown (expire timer for unresolved entries) ok mpi@
* Add umb(4) - a driver for the Mobile Broadband Interface Model (MBIM)gerhard2016-06-151-1/+2
| | | | | | | | | The umb(4) driver provides support for USB MBIM devices. Those devices establish connections via celluar networks such as GPRS, UMTS, and LTE. ok mpi@ sthen@ additional feedback from deraadt@ jmc@ stsp@ kettenis@
* add a new getsockopt option IP_IPDEFTTL to retrieve the default ttl.benno2015-10-201-1/+2
| | | | | | this can be used as an alternative to sysctl net.inet.ip.ttl, in programs that use pledge(). ok reyk@, "Like this" deraadt@
* Remove support for storing credentials and auth information in the kernel.mikeb2015-04-141-5/+5
| | | | | | | | | This code is largely unfinished and is not used for anything. The change leaves identities as only objects referenced by ipsec_ref structure and their handling requires some changes to support more advanced matching of IPsec connections. No objections from reyk and hshoexer, with and OK markus.
* replace the use of ifqueues for most input queues serviced by netisrdlg2015-04-101-2/+2
| | | | | | | | | | | | | | | | | with niqueues. this change is so big because there's a lot of code that takes pointers to different input queues (eg, ether_input picks between ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through to code to enqueue packets against the pointer. if i changed only one of the input queues id have to add sepearate code paths, one for ifqueues and one for niqueues in each of these places by flipping all these input queues at once i can keep the currently common code common. testing by mpi@ sthen@ and rafael zalamena ok mpi@ sthen@ claudio@ henning@
* Implement 2 sysctl to retrieve the multicast forwarding cache (mfc) and theclaudio2015-02-091-3/+9
| | | | | virtual interface table (vif). Will be used by netstat soon. Looked over by guenther@
* Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.mpi2014-12-051-1/+3
| | | | ok mikeb@, krw@, bluhm@, tedu@
* Since in_broadcast() is now used to always iterate on all the interfacesmpi2014-11-251-2/+2
| | | | | | of your system, put it on a diet and kill the superfluous logic. ok mikeb@
* Tackle the endian.h mess. Make it so that:guenther2014-07-121-2/+10
| | | | | | | | | | | | | | | | | | * you can #include <sys/endian.h> instead of <machine/endian.h>, and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first) * those will always export the symbols that POSIX specified for <endian.h>, including the new {be,le}{16,32,64}toh() set. c.f. http://austingroupbugs.net/view.php?id=162 if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h> currently exports (ntohs, NTOHS, dlg's bemtoh*, etc) * when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and <arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER and betoh* ok deraadt@
* Kill in_localaddr(), one less usage of the global list of IPv4 addresses.mpi2014-04-251-2/+1
| | | | | | | | | | This function is used only once in our tree to optimize the size of the MSS if the forward address correspond to a host on one of our subnets, but only if ip.mutdisc is disable, which is not the default! While here get rid of the "#ifdef RTV_MTU", it is here. ok henning@, mikeb@, bluhm@
* remove a define in an #ifdef notyet - "not yet" for 19 years gotta behenning2014-04-211-7/+1
| | | | | enough. remove a define in an #ifdef notdef /* obsolete */ - 14 years are enough
* annotate all #endifs to make clear what #if(def) they endhenning2014-04-211-9/+8
|
* cosmetic changes regarding #ifdef to make things more obvious, ok reykhenning2014-04-211-4/+4
|
* move in_cksum_phdr from in.h (under #ifdef _KERNEL, at least) to ip_output.chenning2014-04-201-32/+1
| | | | | nothing except in_proto_cksum_out() uses it any more, and that's a good thing. was on tech for 3 months, discussed with many
* nuke in_cksum_addword()henning2014-04-201-17/+1
| | | | | | | | | | don't we all love functions implemented in header files? was under #ifdef _KERNEL at least. incremental checksum updates don't really make sense any more, this is incredibly hard to get right, and doesn't fit the way our kernel deals with the checksums these days. consequently, nothing uses in_cksum_addword any more. was on tech for 3 months, tested by & discussed with many.
* put the in{,6}_delayed_cksum() and in{,6}_proto_cksum_out() prototypesnaddy2014-01-231-2/+1
| | | | into consistent locations; ok henning@
* Replace most of our formating functions to convert IPv4/6 addresses frommpi2013-11-111-1/+3
| | | | | | | | network to presentation format to inet_ntop(). The few remaining functions will be soon converted. ok mikeb@, deraadt@ and moral support from henning@
* Remove the number of in_var.h inclusions by moving some functions andmpi2013-10-231-2/+8
| | | | | | global variables to in.h. ok mikeb@, deraadt@
* No need to expose twice in_socktrim(), it is only used in one file.mpi2013-10-231-2/+1
|
* Remove some historical comments.deraadt2013-10-211-6/+1
|
* Introduce in_ifdetach() a function to remove all the IPv4 addressesmpi2013-10-091-1/+2
| | | | | | | | | | of an interface, named after its IPv6 equivalent. Make use of it instead of removing addresses by hand when detaching or destroying an interface. As a bonus, multicast records linked to the just divorced^Wdetached interface are no longer leaked. No objection from the gang, ok mikeb@
* Convert the satosin, sintosa, ifatoia, satosin6, sin6tosa, ifatoia6bluhm2013-03-281-4/+29
| | | | | | defines into static inline functions. This allows the compiler to check the source type before casting. liked by many; OK mpi@ haesbaert@
* Add the IP_DIVERTFL socket option on divert(4) sockets to controlbenno2012-10-211-1/+5
| | | | | | which packets (as in direction) of the traffic will be diverted through the divert socket. ok claudio@, henning@
* Improve POSIX/SUS compliance of <netdb.h>, <sys/socket.h>, and <sys/un.h>.guenther2012-09-151-1/+6
| | | | | Much ports testing of various versions by naddy@ and jasper@ ok matthew@, miller@
* add IP_IPSECFLOWINFO option to sendmsg() and recvmsg(), so npppd(4)markus2012-07-161-1/+2
| | | | | | | can use this to select the IPsec tunnel for sending L2TP packets. this fixes Windows (always binding to 1701) and Android clients (negotiating wildcard flows); feedback mpf@ and yasuoka@; ok henning@ and yasuoka@; ok jmc@ for the manpage
* Instead of <arpa/inet.h> pulling in <netinet/in.h>, just copy in theguenther2012-07-101-1/+6
| | | | | | | three things that it needed from there: INET_ADDRSTRLEN, INET6_ADDRSTRLEN, and struct in_addr. Add protecting #ifndefs to netinet6?/in6?.h for those. ok deraadt@
* Improve compliance for <arpa/inet.h> and <netinet/in.h> to define/declareguenther2012-06-261-3/+18
| | | | | | | | all the symbols that POSIX says they must and fewer that they can't and, most importantly, to not require a specific ordering of headers. ports testing by naddy@ ok millert@ deraadt@