summaryrefslogtreecommitdiff
path: root/sys/net/if.h
AgeCommit message (Collapse)Author
2010-01-13maintain a global RB tree of all local addresses in the system. thisHenning Brauer
includes AF_LINK addresses (aka mac addresses in the ethernet case). for inet this also includes the broadcast addresses. depends on ifinit() called earlier so we have a chance to pool_init before autoconf assigns the AF_LINK addresses, the v6 fix, and the ifa_add/del abstraction i just committed. this is a change in semantics, it is now illegal to change the actual address in an ifaddr struct because then the RB tree becomes unbalanced. nothing using this tree yet. ok theo ryan dlg
2010-01-13instead of fiddling with the per-interface address lists directly inHenning Brauer
many places create a proper API (ifa_add / ifa_del) and use it. ok theo ryan dlg
2010-01-12Make the structures for ifa_msghdr and friends even more likeTheo de Raadt
the route messages so that people and compilers will not get confused. ok claudio
2009-09-17Remove the comaptibility structures for routing socket version 3.Claudio Jeker
The RTM_VERSION bump is 2 years ago and so there is no need for this. Diff made by tedu@ some time ago but got never commited so I do it now.
2009-09-14Add a way to convert the ifi_link_state to a string without the use ofClaudio Jeker
if_media. This makes link state tracking a lot easier as there is no need to convert if types to if_media types, etc. Additionally this allows us to extend the link states to include states tracked on higher protocol layers. gre(4) keepalives packets, bfd and udld can be implemented without ugly hacks. OK henning, michele, sthen, deraadt
2009-08-10At sys_reboot time, bring all the interfaces down so that their xxstopTheo de Raadt
functions are called, which will turn off DMA. Receiving packets into your memory after a system reboot is pretty nasty. This will also mean that the shutdown hooks can go; this solution is smaller. ok henning miod dlg kettenis
2009-06-06when xflags got changed, tell the userland by routing socketsRainer Giedat
ok henning@
2009-06-05Initial support for routing domains. This allows to bind interfaces toClaudio Jeker
alternate routing table and separate them from other interfaces in distinct routing tables. The same network can now be used in any doamin at the same time without causing conflicts. This diff is mostly mechanical and adds the necessary rdomain checks accross net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6. input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
2009-06-04allow IPvShit to be turned off completely per-interface.Henning Brauer
ifconfig em0 -inet6 deletes all v6 addresses including link-local and prevents new ones from being added. ifconfig em0 inet6 <addr> re-enables v6, brings the link local back and adds optional <addr> ok theo reyk
2009-06-03make wireless interfaces priority 4 by default. other interfaces remainBob Beck
priority 0. while we are in here make sure we add wi interfaces to group "wlan" in the same way the net80211 stuff already is. this makes dhcp multiple default routes useful on laptops. ok claudio@
2009-01-27make drivers tell the mclgeti allocator what their maximum ring size isDavid Gwynne
to prevent the hwm growing beyond that. this allows the livelock mitigation to do something where the hwm used to grow beyond twice the rx rings size. ok kettenis@ claudio@
2008-12-12Introduce a if_priority that will be added to RTP_STATIC when routes areClaudio Jeker
added without an expilict priority. This allows to specify less prefered interfaces that will only take over if the primary interface loses link. OK deraadt@
2008-12-11export per-interface mbuf cluster pool use statistics out to userlandTheo de Raadt
inside if_data, so that netstat(1) and systat(1) can see them ok dlg
2008-11-30- Remove unused if_reset "bus reset routine" field in the ifnet struct.Brad Smith
- Add if_stop "stop routine" field in the ifnet struct. ok mglocker@
2008-11-26provide m_clsetlwm, an interface for an interface to raise its lowDavid Gwynne
watermark for mbuf cluster allocations. this is necessary for things like bge which cannot cope with less than a certain number of pkts on the ring. ok deraadt@
2008-11-25Factor increases are not needed, +1 appears to work as well.Theo de Raadt
ok dlg
2008-11-24move MCLPOOLS to if.h and force uipc_mbuf.c to get if.h, there is noTheo de Raadt
other option ok dlg
2008-11-24add several backend pools to allocate mbufs clusters of various sizes outDavid Gwynne
of. currently limited to MCLBYTES (2048 bytes) and 4096 bytes until pools can allocate objects of sizes greater than PAGESIZE. this allows drivers to ask for "jumbo" packets to fill rx rings with. the second half of this change is per interface mbuf cluster allocator statistics. drivers can use the new interface (MCLGETI), which will use these stats to selectively fail allocations based on demand for mbufs. if the driver isnt rapidly consuming rx mbufs, we dont allow it to allocate many to put on its rx ring. drivers require modifications to take advantage of both the new allocation semantic and large clusters. this was written and developed with deraadt@ over the last two days ok deraadt@ claudio@
2008-11-07give this some /* CONSTCOND */ loveTheo de Raadt
2008-04-10introduce mitigation for the calling of an interfaces start routine.David Gwynne
decent drivers prefer to have a lot of packets on the send queue so they can queue a lot of them up on the tx ring and then post them all in one big chunk. unfortunately our stack queues one packet onto the send queue and then calls the start handler immediately. this mitigates against that queue, send, queue, send behaviour by trying to call the start routine only once per softnet. now its queue, queue, queue, send. this is the result of a lot of discussion with claudio@ tested by many.
2007-11-18Sync struct ifaltq to match struct ifqueue.Marco Pfatschbacher
I wonder why 64-bit archs have not been bitten by this. OK mcbride@, henning@
2007-09-03Bump RTM_VERSION to 4 and start a new aera of routing in OpenBSD :)Claudio Jeker
Changes include 64bit counters instead of u_long, routing table id in the header of most messages, reserved routing priority field, added a hdrlen field to skip over the header so that binary compatibility becomes easier. A minimal backward support for old binaries is included to ease upgrades but don't expect anything more than ifconfig, route and dhclient to correctly work. OK henning@ mglocker@
2007-06-25crank ifq_maxlen from 50 to 256, so it is not smaller than most interfacesHenning Brauer
rx rings any more. forwarding boxes with many fast interfaces can still use some more, but this is a saner default. ok deraadt markus henric
2007-06-14Add a new "rtlabel" option to ifconfig. It allows to specify a route labelReyk Floeter
which will be used for new interface routes. For example, ifconfig em0 10.1.1.0 255.255.255.0 rtlabel RING_1 will set the new interface address and attach the route label RING_1 to the corresponding route. manpage bits from jmc@ ok claudio@ henning@
2007-05-29Define IF_ENQUEUE() and friends as proper C statements using do ... whileUwe Stuehler
ok henning
2007-05-26one extern seems to be better than 20 for ifqmaxlen; ok krwJason Wright
2007-03-27grammar from bret lambert, and one more from me;Jason McIntyre
2007-02-09grammar fix from bret lambert;Jason McIntyre
2006-11-28add additional link states to report the half duplex / full duplexReyk Floeter
state, if known by the driver. this is required to check the full duplex state without depending on the ifmedia ioctl which can't be called in the kernel without process context. ok henning@, brad@
2006-11-16introduce if_creategroup() to create an empty interface group.Henning Brauer
code factored out from if_addgroup(), previously a group always had to have members. ok mpf mcbride
2006-10-31ether_input_mbuf() isn't necessary, turn it into a macro and deal withJason Wright
it's "special" case in ether_input(). Based on similiar idea in FreeBSD. ok brad
2006-06-02Introduce attributes to interface groups.Marco Pfatschbacher
As a first user, move the global carp(4) demotion counter into the interface group. Thus we have the possibility to define which carp interfaces are demoted together. Put the demotion counter into the reserved field of the carp header. With this, we can have carp act smarter if multiple errors occur. It now always takes over other carp peers, that are advertising with a higher demote count. As a side effect, we can also have group failovers without the need of running in preempt mode. The protocol change does not break compability with older implementations. Collaborative work with mcbride@ OK mcbride@, henning@
2006-05-27remove IFCAP_JUMBO_MTU interface capabilities flag and set if_hardmtu in a fewBrad Smith
more drivers. ok reyk@
2006-05-26rename jumbo mtu to if_hardmtu; ok brad reykTheo de Raadt
2006-05-19add a if_jumbo_mtu field to the interface structure for driversReyk Floeter
supporting ethernet jumbo frames. there's no standard for the size of jumbo MTUs, so either let the driver set it's own value or use 9000 byte jumbo frames by default. ok brad@
2006-03-04With the exception of two other small uncommited diffs this movesBrad Smith
the remainder of the network stack from splimp to splnet. ok miod@
2006-02-09add an interface detach hook and use it with the vlan(4) driver. thisReyk Floeter
fixes a possible crash if the parent interface has been destroyed (like vlan on trunk) before destroying the vlan interface. ok brad@
2005-06-14rename function and define to reflect the external -> egress name changeHenning Brauer
so it is clear what it is all about
2005-06-14use "egress" instead of "external" for the interface group containing theHenning Brauer
interfaces the default route(s) point to, proposed deraadt some days ago, ok djm deraadt
2005-06-12add SIOCGIFGMEMB ioctl, returns a list of all interfaces who are member ofHenning Brauer
the given group, markus ok
2005-06-07introduce a default "external" interface group, containing the interface(s)Henning Brauer
the the default route(s) point to. handles IPv4 and IPv6 as well as multipath routes. follows default route changes, of course. eases writing pf rulesets especially on laptops etc. that use different interfaces depending on the environment (wired, wireless, ...) ok theo ryan
2005-06-06use a define instead of hardcoding "all" in 3 placesHenning Brauer
2005-06-05const'ify the char *groupname param to if_addgroup and if_delgroupHenning Brauer
2005-05-24add net.inet.ip.ifq for monitoring and changing ifqueue; similar to netbsdMarkus Friedl
ok henning
2005-05-24initial import of a trunking (link aggregation and link failover)Reyk Floeter
implementation. it currently supports round robin mode with link state checking, additional modes will be added later. ok brad@, deraadt@
2005-05-24keep a list of member interfaces in ifg_groupHenning Brauer
2005-05-22allow pf to match on interface groupsHenning Brauer
pass on mygroup ... markus ok
2005-05-21clean up and rework the interface absraction code big time, rip out multipleHenning Brauer
useless layers of indirection and make the code way cleaner overall. this is just the start, more to come... worked very hard on by Ryan and me in Montreal last week, on the airplane to vancouver and yesterday here in calgary. it hurt. ok ryan theo
2005-04-20Introduce if_linkstatehooks.Marco Pfatschbacher
This converts if_link_state_change() to a generic usable callback with dohooks(). OK henning@, camield@ Tested by camield@ and Alexey E. Suslikov
2005-02-07Add new function if_link_state_change() to take care of sending messagesRyan Thomas McBride
on the routing socket and notifying carp() of link changes. ok brad@ mpf@