OpenBSD CVS

CVS log for src/sys/net/if.h


[BACK] Up to [local] / src / sys / net

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.216 / (download) - annotate - [select for diffs], Thu Apr 11 15:08:18 2024 UTC (7 weeks, 2 days ago) by bluhm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.215: +2 -2 lines
Diff to previous 1.215 (colored)

Prevent changing interface loopback flag from userland.

IFF_LOOPBACK is telling userland the behaviour of a specific driver,
it is supposed to be static and permanent.  Clearing the loopback
flag on lo0 could lead to a kernel crash due to inconsistent multicast
igmp group.

Reported-by: syzbot+2f24ed6c8ddb2d6bb22c@syzkaller.appspotmail.com
OK claudio@ deraadt@

Revision 1.215 / (download) - annotate - [select for diffs], Sat Nov 11 14:24:03 2023 UTC (6 months, 3 weeks ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.214: +2 -2 lines
Diff to previous 1.214 (colored)

Pass constant struct sockaddr to interface lookup functions.

OK mvs@

Revision 1.214 / (download) - annotate - [select for diffs], Tue May 30 23:55:42 2023 UTC (12 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.213: +2 -1 lines
Diff to previous 1.213 (colored)

add net_tq_barriers

this waits once for something to end in all the net tqs.

ok claudio@

Revision 1.213 / (download) - annotate - [select for diffs], Tue May 16 14:32:54 2023 UTC (12 months, 2 weeks ago) by jan
Branch: MAIN
Changes since 1.212: +4 -4 lines
Diff to previous 1.212 (colored)

Use separate IFCAPs for LRO and TSO.

This diff introduces separate capabilities for TCP offloading.  We split this
into LRO (large receive offloading) and TSO (TCP segmentation offloading).
LRO can be turned on/off via tcprecvoffload option of ifconfig and is not
inherited to sub interfaces.

TSO is inherited by sub interfaces to signal this hardware offloading capability
to the network stack.

With tweaks from bluhm, claudio and dlg

ok bluhm, claudio

Revision 1.212 / (download) - annotate - [select for diffs], Mon May 15 16:34:56 2023 UTC (12 months, 2 weeks ago) by bluhm
Branch: MAIN
Changes since 1.211: +5 -3 lines
Diff to previous 1.211 (colored)

Implement the TCP/IP layer for hardware TCP segmentation offload.
If the driver of a network interface claims to support TSO, do not
chop the packet in software, but pass it down to the interface
layer.
Precalculate parts of the pseudo header checksum, but without the
packet length.  The length of all generated smaller packets is not
known yet.  Driver and hardware will use the mbuf packet header
field ph_mss to calculate it and update checksum.
Introduce separate flags IFCAP_TSOv4 and IFCAP_TSOv6 as hardware
might support ony one protocol family.  The old flag IFXF_TSO is
only relevant for large receive offload.  It is missnamed, but keep
that for now.
Note that drivers do not set TSO capabilites yet.  Also the ifconfig
flags and pseudo interfaces capabilities will be done separately.
So this commit should not change behavior.
heavily based on the work from jan@; OK sashan@

Revision 1.211 / (download) - annotate - [select for diffs], Tue Mar 7 20:09:48 2023 UTC (14 months, 3 weeks ago) by jan
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.210: +2 -2 lines
Diff to previous 1.210 (colored)

Avoid enabling TSO on interfaces which are already attached to a bridge.

with tweaks from claudio and deraadt

ok claudio, bluhm

Revision 1.210 / (download) - annotate - [select for diffs], Mon Feb 27 09:35:32 2023 UTC (15 months ago) by jan
Branch: MAIN
Changes since 1.209: +2 -1 lines
Diff to previous 1.209 (colored)

Turn off TSO if interface is added to layer 2 devices.

ok bluhm@, claudio@

Revision 1.209 / (download) - annotate - [select for diffs], Mon Jun 27 15:11:23 2022 UTC (23 months ago) by jan
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.208: +3 -1 lines
Diff to previous 1.208 (colored)

Introduce Large Receive Offloading of TCP segment offloading for ix(4).  It is
disabled by default.  Also add a tso option to ifconfig(8) to enable and
disable this feature.

ok deraadt

Revision 1.208 / (download) - annotate - [select for diffs], Thu Mar 11 19:53:40 2021 UTC (3 years, 2 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.207: +2 -2 lines
Diff to previous 1.207 (colored)

When RFC 8981 obsoleted RFC 4941 the terminology changed from
"privacy extensions" to "temporary address extensions"

Change ifconfig(8) to output temporary after temporary addresses and
add "temporary" option which is an alias for autoconfprivacy for now.

Also make AUTOCONF6TEMP a positiv flag that is set by default.
Previously the negative flag "INET6_NOPRIVACY" was set when privacy
addresses were disabled. This makes the flags output less ugly and
will allow us to disable autoconf addresses while having temporary
addresses enabled in the future.

More work is needed in slaacd.

input benno, jmc, deraadt
previous verison OK benno
OK jmc, kn

Revision 1.207 / (download) - annotate - [select for diffs], Sat Feb 20 01:11:44 2021 UTC (3 years, 3 months ago) by dlg
Branch: MAIN
Changes since 1.206: +2 -1 lines
Diff to previous 1.206 (colored)

add a MONITOR flag to ifaces to say they're only used for watching packets.

an example use of this is when you have a span port on a switch and
you want to be able to see the packets coming out of it with tcpdump,
but do not want these packets to enter the network stack for
processing. this is particularly important if the span port is
pushing a copy of any packets related to the machine doing the
monitoring as it will confuse pf states and the stack.

ok benno@

Revision 1.206 / (download) - annotate - [select for diffs], Mon Feb 1 07:43:33 2021 UTC (3 years, 4 months ago) by mvs
Branch: MAIN
Changes since 1.205: +1 -2 lines
Diff to previous 1.205 (colored)

ifunit() was fully replaced by if_unit(9) and should go away.

ok bluhm@ dlg@

Revision 1.205 / (download) - annotate - [select for diffs], Mon Jan 18 09:55:43 2021 UTC (3 years, 4 months ago) by mvs
Branch: MAIN
Changes since 1.204: +2 -1 lines
Diff to previous 1.204 (colored)

Introduce new function if_unit(9). This function returns a pointer the
interface descriptor corresponding to the unique name. This descriptor
is guaranteed to be valid until if_put(9) is called on the returned
pointer. if_unit(9) should replace already existent ifunit() which
returns descriptor not safe for dereference when context was switched.
This allow us to avoid some use-after-free issues in ioctl(2) path.
Also this unifies interface descriptor usage.

ok claudio@ sashan@

Revision 1.204 / (download) - annotate - [select for diffs], Wed Sep 30 19:22:51 2020 UTC (3 years, 8 months ago) by mvs
Branch: MAIN
Changes since 1.203: +1 -2 lines
Diff to previous 1.203 (colored)

We have no if_attachtail() function so remove the declaration.

ok deraadt@ claudio@

Revision 1.203 / (download) - annotate - [select for diffs], Thu Jul 25 15:23:39 2019 UTC (4 years, 10 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.202: +2 -2 lines
Diff to previous 1.202 (colored)

AF_INET comes before AF_INET6. Shorten line to <80 chars.

pointed out by claudio@

Revision 1.202 / (download) - annotate - [select for diffs], Thu Jul 25 13:56:23 2019 UTC (4 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.201: +2 -1 lines
Diff to previous 1.201 (colored)

Add IFXF_AUTOCONF4 to if_xflags to match IFXF_AUTOCONF6. Let
ifconfig set/unset it.

ok deraadt@ kmos@

Revision 1.201 / (download) - annotate - [select for diffs], Fri Apr 19 04:15:31 2019 UTC (5 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.200: +2 -1 lines
Diff to previous 1.200 (colored)

add IF_HDRPRIO_OUTER for rxprio

IF_HDRPRIO_OUTER says you want the priority from the outer encap header.

ok claudio@

Revision 1.200 / (download) - annotate - [select for diffs], Wed Apr 10 09:49:22 2019 UTC (5 years, 1 month ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.199: +15 -1 lines
Diff to previous 1.199 (colored)

add struct if_sffpage so userland can read a page of sfp/qsfp info

this will be used by ifconfig so it can show you things like who
mades what module you're using and when it was made, and on some
modules you get diag info like temperature, vcc, and rx and tx
powers.

im putting the kernel side in so we can keep fiddling with the
userland printf side of things.

this work was done based on a question by rachel roch
ok deraadt@
enthusiasm from many including mikeb@ sthen@ patrick@

Revision 1.199 / (download) - annotate - [select for diffs], Wed Jan 23 08:23:18 2019 UTC (5 years, 4 months ago) by dlg
Branch: MAIN
Changes since 1.198: +5 -1 lines
Diff to previous 1.198 (colored)

add a SIOCGPWE3 ioctl for interfaces to advertise pwe3 capability

im going to turn mpw into an ethernet interface, which includes
changing its if_type to IFT_ETHER. currently ldpd looks for if_type
IFT_MPLSTUNNEL to decide if an interface is a pseudowire, ie, it's
going to break. the ioctl will let ldpd ask the interface if it is
pseudowire capable as an alternative.

ok claudio@

Revision 1.198 / (download) - annotate - [select for diffs], Mon Nov 12 23:34:48 2018 UTC (5 years, 6 months ago) by dlg
Branch: MAIN
Changes since 1.197: +7 -1 lines
Diff to previous 1.197 (colored)

add ifreq bits for the tx header prio field ioctls

a tx header prio can set to a fixed value from 0 to 7, or magic
values to represent populating the prio field from the encapsulated
packet, or from the mbuf prio value.

ok claudio@

Revision 1.197 / (download) - annotate - [select for diffs], Mon Nov 12 16:36:54 2018 UTC (5 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.196: +22 -1 lines
Diff to previous 1.196 (colored)

Add new routing socket message RTM_80211INFO to provide details of
802.11 interface state changes (e.g. SSID) to interested parties.

Original diff from phessler@. Many suggestions and tweaks from
claudio@, stsp@, anton@.

ok claudio@ stsp@ anton@ phessler@

Revision 1.196 / (download) - annotate - [select for diffs], Sun Nov 11 05:55:10 2018 UTC (5 years, 6 months ago) by dlg
Branch: MAIN
Changes since 1.195: +3 -1 lines
Diff to previous 1.195 (colored)

use the llprio on gre(4) and eoip(4) interfaces for the keepalive tos

llprios are valued 0 to 7, while the ip tos/dscp/tclass is an 8 bit
value. fortunately the high 3 bits map nicely to the llprio values,
so we shift the llprio into place when generating the keepalive
frames. the llprio is defaulted to the value that cisco uses for
their gre keepalives.

Revision 1.195 / (download) - annotate - [select for diffs], Wed Sep 12 09:20:34 2018 UTC (5 years, 8 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.194: +2 -2 lines
Diff to previous 1.194 (colored)

Fix obvious cut&pasto in comment (ifa_msghdr -> if_announcemsghdr).

ok claudio@

Revision 1.194 / (download) - annotate - [select for diffs], Wed May 30 22:20:41 2018 UTC (6 years ago) by dlg
Branch: MAIN
Changes since 1.193: +2 -1 lines
Diff to previous 1.193 (colored)

restrict the prio values from SIOCSIFLLPRIO to what the kernel handles

previously the ioctl code checked that prio was an int less than
UCHAR_MAX, but the rest of the kernel (and priq code in particular)
expects it to be between 0 and 7 inclusive.

ok krw@ tb@

Revision 1.193 / (download) - annotate - [select for diffs], Wed Apr 25 16:05:58 2018 UTC (6 years, 1 month ago) by jca
Branch: MAIN
Changes since 1.192: +5 -1 lines
Diff to previous 1.192 (colored)

Make this header standalone #if __BSD_VISIBLE, by including needed headers

Puts us in line with Free/NetBSD and Linux and will get us rid of
pointless patches in the ports tree.  ok guenther@ deraadt@

Revision 1.192 / (download) - annotate - [select for diffs], Mon Feb 19 04:43:48 2018 UTC (6 years, 3 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.191: +2 -1 lines
Diff to previous 1.191 (colored)

tunneldf needs ifr_df

Revision 1.191 / (download) - annotate - [select for diffs], Sat Feb 10 05:52:08 2018 UTC (6 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.190: +2 -1 lines
Diff to previous 1.190 (colored)

Implement RFC 7217: "A Method for Generating Semantically Opaque
Interface Identifiers with IPv6 Stateless Address Autoconfiguration."

"An IPv6 address configured using this method is stable within each
subnet, but the corresponding Interface Identifier changes when the
host moves from one network to another. This method is meant to be an
alternative to generating Interface Identifiers based on hardware
addresses."

OK naddy, sthen

Revision 1.190 / (download) - annotate - [select for diffs], Tue Jan 16 10:33:55 2018 UTC (6 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.189: +32 -23 lines
Diff to previous 1.189 (colored)

Recycle IFF_NOTRAILERS into IFF_STATICARP and document ownerhsip
of IFF* flags.

inputs from jmc@, ok bluhm@, visa@

Revision 1.189 / (download) - annotate - [select for diffs], Thu Dec 21 01:11:47 2017 UTC (6 years, 5 months ago) by dlg
Branch: MAIN
Changes since 1.188: +2 -1 lines
Diff to previous 1.188 (colored)

prototype if_attach_iqueues so drivers can configure multiple iqs.

Revision 1.188 / (download) - annotate - [select for diffs], Thu Nov 9 09:07:01 2017 UTC (6 years, 6 months ago) by tb
Branch: MAIN
Changes since 1.187: +1 -2 lines
Diff to previous 1.187 (colored)

The cmd argument of ifconf() has been unused since COMPAT_LINUX was
purged.  Remove it and move the prototype to if.c since ifconf() is
not used outside of this file.

ok mpi

Revision 1.187 / (download) - annotate - [select for diffs], Tue Oct 31 22:05:12 2017 UTC (6 years, 7 months ago) by sashan
Branch: MAIN
Changes since 1.186: +2 -1 lines
Diff to previous 1.186 (colored)

- add one more softnet taskq
  NOTE: code still runs with single softnet task.  change definition of
  SOFTNET_TASKS in net/if.c, if you want to have more than one softnet task

OK mpi@, OK phessler@

Revision 1.186 / (download) - annotate - [select for diffs], Tue Jan 24 10:08:30 2017 UTC (7 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.185: +2 -2 lines
Diff to previous 1.185 (colored)

A space here, a space there. Soon we're talking real whitespace
rectification.

Revision 1.185 / (download) - annotate - [select for diffs], Tue Jan 24 03:57:35 2017 UTC (7 years, 4 months ago) by dlg
Branch: MAIN
Changes since 1.184: +4 -1 lines
Diff to previous 1.184 (colored)

add support for multiple transmit ifqueues per network interface.

an ifq to transmit a packet is picked by the current traffic
conditioner (ie, priq or hfsc) by providing an index into an array
of ifqs. by default interfaces get a single ifq but can ask for
more using if_attach_queues().

the vast majority of our drivers still think there's a 1:1 mapping
between interfaces and transmit queues, so their if_start routines
take an ifnet pointer instead of a pointer to the ifqueue struct.
instead of changing all the drivers in the tree, drivers can opt
into using an if_qstart routine and setting the IFXF_MPSAFE flag.
the stack provides a compatability wrapper from the new if_qstart
handler to the previous if_start handlers if IFXF_MPSAFE isnt set.

enabling hfsc on an interface configures it to transmit everything
through the first ifq. any other ifqs are left configured as priq,
but unused, when hfsc is enabled.

getting this in now so everyone can kick the tyres.

ok mpi@ visa@ (who provided some tweaks for cnmac).

Revision 1.184 / (download) - annotate - [select for diffs], Mon Jan 23 11:37:29 2017 UTC (7 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.183: +4 -3 lines
Diff to previous 1.183 (colored)

Flag pseudo-interfaces as such in order to call add_net_randomness()
only once per packet.

Fix a regression introduced when if_input() started to be called by
every pseudo-driver.

ok claudio@, dlg@

Revision 1.183 / (download) - annotate - [select for diffs], Mon Jan 23 07:27:21 2017 UTC (7 years, 4 months ago) by dlg
Branch: MAIN
Changes since 1.182: +2 -2 lines
Diff to previous 1.182 (colored)

i botched the copyout to ifr->ifr_data in SIOCGIFDATA.

this lets pflogd run again.

rename if_data() to if_getdata() while here to make grepping for
things less noisy.

reported by jsg@
worked through with deraadt@

Revision 1.182 / (download) - annotate - [select for diffs], Mon Jan 23 01:26:09 2017 UTC (7 years, 4 months ago) by dlg
Branch: MAIN
Changes since 1.181: +2 -1 lines
Diff to previous 1.181 (colored)

merge the ifnet and ifqueue stats together when userland wants them.

a new if_data() function takes a pointer to ifnet and merges its
if_data and ifq statistics. it takes the ifq mutex around the reads
of the ifq stats so they get a consistent copy.

the ifnet and ifq stats are merged because some parts of the stack
still update the ifnet counters.

ok visa@ (on an earlier diff) mpi@ claudio@

Revision 1.181 / (download) - annotate - [select for diffs], Mon Dec 12 09:51:30 2016 UTC (7 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.180: +1 -3 lines
Diff to previous 1.180 (colored)

Remove most of the splsoftnet() recursions related to cloned interfaces.

inputs and ok bluhm@

Revision 1.180 / (download) - annotate - [select for diffs], Thu Oct 27 03:00:35 2016 UTC (7 years, 7 months ago) by dlg
Branch: MAIN
Changes since 1.179: +2 -2 lines
Diff to previous 1.179 (colored)

add a new pool for 2k + 2 byte (mcl2k2) clusters.

a certain vendor likes to make chips that specify the rx buffer
sizes in kilobyte increments. unfortunately it places the ethernet
header on the start of the rx buffer, which means if you give it a
mcl2k cluster, the ethernet header will not be ETHER_ALIGNed cos
mcl2k clusters are always allocated on 2k boundarys (cos they pack
into pages well). that in turn means the ip header wont be aligned
correctly.

the current workaround on these chips has been to let non-strict
alignment archs just use the normal 2k cluster, but use whatever
cluster can fit 2k + 2 on strict archs. that turns out to be the
4k cluster, meaning we waste nearly 2k of space on every packet.

properly aligning the ethernet header and ip headers gives a
performance boost, even on non-strict archs.

Revision 1.179 / (download) - annotate - [select for diffs], Sun Sep 4 15:10:59 2016 UTC (7 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.178: +2 -1 lines
Diff to previous 1.178 (colored)

Move code to change the rdomain of an interface from the ioctl switch case
to a new function if_setrdomain().

OK mpi@ henning@

Revision 1.178 / (download) - annotate - [select for diffs], Sat Sep 3 13:46:57 2016 UTC (7 years, 9 months ago) by reyk
Branch: MAIN
Changes since 1.177: +2 -2 lines
Diff to previous 1.177 (colored)

Add support for a multipoint-to-multipoint mode in vxlan(4).  In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs.  It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@

Revision 1.177 / (download) - annotate - [select for diffs], Fri Jun 10 20:33:29 2016 UTC (7 years, 11 months ago) by vgross
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.176: +2 -1 lines
Diff to previous 1.176 (colored)

Add the "llprio" field to struct ifnet, and the corresponding keyword
to ifconfig.

"llprio" allows one to set the priority of packets that do not go through
pf(4), as the case is for arp(4) or bpf(4).

ok sthen@ mikeb@

Revision 1.176 / (download) - annotate - [select for diffs], Wed Mar 2 00:00:16 2016 UTC (8 years, 3 months ago) by dlg
Branch: MAIN
Changes since 1.175: +7 -1 lines
Diff to previous 1.175 (colored)

provide generic ioctls for managing an interfaces parent

in the future this will subsume the individual vlandev, carpdev,
pppoedev, foodev options for things like vlan, carp, pppoe, etc.

inspired by vnetid

ok mpi@ jmatthew@

Revision 1.175 / (download) - annotate - [select for diffs], Sat Dec 5 19:04:37 2015 UTC (8 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.174: +2 -3 lines
Diff to previous 1.174 (colored)

avoid an ugly wrap in a comment

Revision 1.174 / (download) - annotate - [select for diffs], Thu Dec 3 12:22:51 2015 UTC (8 years, 6 months ago) by dlg
Branch: MAIN
Changes since 1.173: +3 -3 lines
Diff to previous 1.173 (colored)

rework if_start to allow nics to provide an mpsafe start routine.

existing start routines will still be called under the kernel lock
and at IPL_NET.

mpsafe start routines will be serialised so only one instance of
each interfaces function will be running in the kernel at any point
in time. this guarantees packets will be dequeued in order, and the
start routines dont have to lock against themselves because if_start
does it for them.

the code to do that is based on the scsi runqueue code.

this also provides an if_start_barrier() function that should wait
until any currently running instances of if_start have finished.

a driver can opt in to the mpsafe if_start call by doing the following:

1. setting ifp->if_xflags = IFXF_MPSAFE
2. only calling if_start() instead of its own start routine
3. clearing IFF_RUNNING before calling if_start_barrier() on its way down
4. only using IFQ_DEQUEUE (not ifq_deq_begin/commit/rollback)

to simplify the implementation the tx mitigation code has been removed.

tested by several
ok mpi@ jmatthew@

Revision 1.173 / (download) - annotate - [select for diffs], Fri Nov 20 12:27:42 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.172: +1 -2 lines
Diff to previous 1.172 (colored)

Keep if_ref() private, if_get() is what you want to use before if_put().

The thread detaching an interface will sleep until all references to this
interface have been released.  So we decided to only keep references for
a short period of time.

Keeping if_ref() private will hopefully help preserve this goal as long
as it makes sense.

Calling if_get()/if_put() in the same function also allows us to make
use of static analysis tools (thanks jsg@!) to catch our errors.

ok dlg@

Revision 1.172 / (download) - annotate - [select for diffs], Sat Oct 24 10:52:05 2015 UTC (8 years, 7 months ago) by reyk
Branch: MAIN
Changes since 1.171: +3 -1 lines
Diff to previous 1.171 (colored)

Add pair(4), a vether-based virtual Ethernet driver to interconnect
rdomains and bridges on the local system.  This can be used to route
through local rdomains, to create L2 devices (like trunks) between
them, and many other things.

Discussed with many, with input from mpi@
OK sthen@ phessler@ yasuoka@ mikeb@

Revision 1.171 / (download) - annotate - [select for diffs], Fri Oct 23 10:22:29 2015 UTC (8 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.170: +7 -1 lines
Diff to previous 1.170 (colored)

Introduce a new sysctl NET_RT_IFNAMES that returns only ifnames to ifindex
mappings. This will be used by if_nameindex(3), if_nametoindex(3) and
if_indextoname(3) soon to fix the issues in pledge because of inet6 link
local addressing.
OK mpi@ benno@ deraadt@
The libc version will follow soon so better start updating your kernels

Revision 1.170 / (download) - annotate - [select for diffs], Fri Oct 23 01:19:04 2015 UTC (8 years, 7 months ago) by dlg
Branch: MAIN
Changes since 1.169: +3 -2 lines
Diff to previous 1.169 (colored)

tweak the vnetid so it can be optional and therefore cleared/deleted.

the abstract vnetid is promoted to a uin32_t, and adds a SIOCDVNETID
ioctl so it can be cleared.

this is all because i set an assignment on implementing a virtual
network interface and the students got confused when vnetid 0 didnt
show up in ifconfig output.

the vnetid in the vxlan(4) protocol is optional, but the current
code confuses 0 with no vnetid being set. this makes it clear.

ok reyk@ who also simplified my diff

Revision 1.169 / (download) - annotate - [select for diffs], Mon Oct 5 15:19:29 2015 UTC (8 years, 7 months ago) by uebayasi
Branch: MAIN
Changes since 1.168: +2 -1 lines
Diff to previous 1.168 (colored)

Add ifi_oqdrops and its alias to struct if_data.

Necessary bumps in Ports will be handled by sthen@.

OK mpi@ dlg@

Revision 1.168 / (download) - annotate - [select for diffs], Sun Sep 27 16:50:03 2015 UTC (8 years, 8 months ago) by stsp
Branch: MAIN
Changes since 1.167: +2 -1 lines
Diff to previous 1.167 (colored)

Add if_setlladdr(), factored out from ifioctl(). Will be used by iwm(4) soon.
With suggestions from tedu@ and guenther@
ok kettenis@

Revision 1.167 / (download) - annotate - [select for diffs], Fri Sep 11 13:02:28 2015 UTC (8 years, 8 months ago) by stsp
Branch: MAIN
Changes since 1.166: +17 -16 lines
Diff to previous 1.166 (colored)

Make room for media types of the future. Extend the ifmedia word to 64 bits.
This changes numbers of the SIOCSIFMEDIA and SIOCGIFMEDIA ioctls and
grows struct ifmediareq.

Old ifconfig and dhclient binaries can still assign addresses, however
the 'media' subcommand stops working. Recompiling ifconfig and dhclient
with new headers before a reboot should not be necessary unless in very
special circumstances where non-default media settings must be used to
get link and console access is not available.

There may be some MD fallout but that will be cleared up later.

ok deraadt miod
with help and suggestions from several sharks attending l2k15

Revision 1.166 / (download) - annotate - [select for diffs], Wed Sep 9 16:01:10 2015 UTC (8 years, 8 months ago) by dlg
Branch: MAIN
Changes since 1.165: +3 -1 lines
Diff to previous 1.165 (colored)

introduce reference counts for interfaces (ie, struct ifnet *ifp).

if_get can get a reference to an ifp, but it never releases that
reference. this provides an if_put function that can be used to
decrement the refcount.

we cannot come up with a scheme for letting the network stack run on
one (or many) cpus while ioctls are pulling interfaces down on another
cpu without refcounts for the interfaces.

if_put is going in now so we can go through the stack and put the
necessary calls to it in, and then we'll backfill this implementation
to actually check the refcounts when the interface detaches.

ok mpi@ mikeb@ claudio@

Revision 1.165 / (download) - annotate - [select for diffs], Sun Aug 30 10:39:16 2015 UTC (8 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.164: +1 -2 lines
Diff to previous 1.164 (colored)

Use a global table for domains instead of building a list at run time.

As a side effect there's no need to run if_attachdomain() after the
list of domains has been built.

ok claudio@, reyk@

Revision 1.164 / (download) - annotate - [select for diffs], Sun Jun 7 12:02:28 2015 UTC (8 years, 11 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.163: +2 -1 lines
Diff to previous 1.163 (colored)

Introduce unhandled_af() for cases where code conditionally does
something based on an address family and later assumes one of the paths
was taken.  This was initially just calls to panic until guenther
suggested a function to reduce the amount of strings needed.

This reduces the amount of noise with static analysers and acts
as a sanity check.

ok guenther@ bluhm@

Revision 1.163 / (download) - annotate - [select for diffs], Mon May 18 13:32:28 2015 UTC (9 years ago) by reyk
Branch: MAIN
Changes since 1.162: +2 -2 lines
Diff to previous 1.162 (colored)

Move the rdomain from struct ifnet into struct if_data.  This way it
will be exported to userland with the existing sysctl, getifaddrs()
and routing socket (if_msghdr.ifm_data) interfaces that expose
if_data.  All programs and daemons - Apps - that call the
SIOCGIFRDOMAIN ioctl in a getifaddrs() loop or after receiving an
interface message on the routing socket can now remove the pointless
additional ioctl.  In base, that could be: dhclient, isakmpd, dhcpd,
dhcrelay, ntpd, ospfd, ripd, ifconfig.

No ABI breakage because it uses a previously unused pad field in if_data.

OK mpi@ deraadt@

Revision 1.162 / (download) - annotate - [select for diffs], Fri Apr 10 08:48:24 2015 UTC (9 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.161: +2 -1 lines
Diff to previous 1.161 (colored)

Run detach hook and similar before cleaning up any other resource when
an interface is destroyed/removed.  This way we can ensure pseudo-driver
changes done after attaching an interface are undone before detaching it.

Note: it is safe to call if_deactivate() multiple times as the interface
should not have any attached pseudo-interface after the first call.

ok deraadt@, dlg@

Revision 1.161 / (download) - annotate - [select for diffs], Wed Mar 18 12:23:15 2015 UTC (9 years, 2 months ago) by dlg
Branch: MAIN
Changes since 1.160: +3 -1 lines
Diff to previous 1.160 (colored)

remove the congestion handling from struct ifqueue.

its only used for the ip and ip6 network stack input queues, so it
seems unfair that every instance of ifqueue has to carry a pointer
around for this specific use case.

this moves the congestion marker to a kernel global. if we detect
that we're congested, we assume the whole system is busy and punish
all input queues.

marking a system as congested is done by setting the global to the
current value of ticks. as the system moves away from that value,
it moves away from being congested until the comparison fails.

written at s2k15
ok henning@ beck@ bluhm@ claudio@

Revision 1.160 / (download) - annotate - [select for diffs], Sun Feb 8 06:00:52 2015 UTC (9 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.159: +1 -2 lines
Diff to previous 1.159 (colored)

Introduce if_input() a function to pass packets dequeued from a
recieving ring to the stack.

if_input() is at the moment a drop-in replacement for ether_input_mbuf()
but will let us stack pseudo-driver in a nice way in order to no longer
call ether_input() recursively.

ok pelikan@, reyk@, blambert@, henning@

Revision 1.159 / (download) - annotate - [select for diffs], Tue Jan 6 21:26:46 2015 UTC (9 years, 4 months ago) by stsp
Branch: MAIN
Changes since 1.158: +7 -2 lines
Diff to previous 1.158 (colored)

Remove the NOINET6 interface flag, a left-over from the times when IPv6
was enabled by default. Add AFATTACH/AFDETACH ioctls which enable/disable
an address family for an interface (currently used for IPv6 only).

New kernel needs new ifconfig for IPv6 configuration (address assignment
still works with old ifconfig making this easy to cross over).

Committing on behalf of henning@ who is currently lebensmittelvergiftet.
ok stsp, benno, mpi

Revision 1.158 / (download) - annotate - [select for diffs], Fri Dec 5 15:50:04 2014 UTC (9 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.157: +30 -3 lines
Diff to previous 1.157 (colored)

Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.

ok mikeb@, krw@, bluhm@, tedu@

Revision 1.157 / (download) - annotate - [select for diffs], Mon Jul 14 03:45:43 2014 UTC (9 years, 10 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.156: +1 -12 lines
Diff to previous 1.156 (colored)

now that receive ring accounting has been pulled out of the mbuf layer,
we can pull the space the mbuf layer used to do per interface accounting
out of struct if_data.

saves a hundredish bytes on every interface.

ok deraadt@ claudio@

Revision 1.156 / (download) - annotate - [select for diffs], Fri Jul 11 16:39:06 2014 UTC (9 years, 10 months ago) by henning
Branch: MAIN
Changes since 1.155: +1 -0 lines
Diff to previous 1.155 (colored)

introduce the IFXF_AUTOCONF6 interface flag which controls wether we
accept rtadvs on that interface. the global net.inet6.ip6.accept_rtadv
sysctl just doesn't cut it, even tho the spec wants that - but in their
little absurd world, a host just has one interface by definition anyway...
the sysctlgoes away.
lots of head scratching, brain cell elemination etc from bluhm benno stsp
florian, excitement from simon and todd, ok bluhm stsp benno florian

Revision 1.155 / (download) - annotate - [select for diffs], Tue Jul 8 04:02:14 2014 UTC (9 years, 10 months ago) by dlg
Branch: MAIN
Changes since 1.154: +21 -1 lines
Diff to previous 1.154 (colored)

introduce the if_rxr api. it is intended to pull the rx ring accounting
out of the mbuf layer, and break the assumption that an interface will
only have a single ring per mbuf cluster size.

mpi@ is ok with moving this forward

Revision 1.154 / (download) - annotate - [select for diffs], Fri Jun 13 07:28:12 2014 UTC (9 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.153: +2 -1 lines
Diff to previous 1.153 (colored)

Instead of updating all the cluster allocation water marks of all the
interfaces when the kernel is livelocked, only do it for the current
pool and defer the other updates.

This allow us to get rid of an interface list iteration in a critical
path.

Ridding the libc crank since this change introduce an ABI break.

ok claudio@

Revision 1.153 / (download) - annotate - [select for diffs], Thu Nov 21 17:32:12 2013 UTC (10 years, 6 months ago) by mikeb
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.152: +4 -489 lines
Diff to previous 1.152 (colored)

split kernel parts of the if.h into a separate header file if_var.h
which allows us to modify ifnet structure in a relatively safe way;
discussed with deraadt, ok mpi

Revision 1.152 / (download) - annotate - [select for diffs], Sat Nov 9 06:38:42 2013 UTC (10 years, 6 months ago) by dlg
Branch: MAIN
Changes since 1.151: +2 -2 lines
Diff to previous 1.151 (colored)

ticks is compared against mcl_grown to see if time has elapsed since
the rx ring was last allowed to grow and then assigned to it. it
is erroneous to do this because mcl_grown is a u_int and ticks is an
int.

this makes mcl_grown an int, and follows the idiom in kern_timeout.c
of going "thing - ticks < diff", which better copes with ticks
wrapping around and being used to calculate relative intervals.

ok pirofti@ guenther@

Revision 1.151 / (download) - annotate - [select for diffs], Fri Nov 1 22:55:39 2013 UTC (10 years, 7 months ago) by pelikan
Branch: MAIN
Changes since 1.150: +3 -1 lines
Diff to previous 1.150 (colored)

keep net/hfsc.h away from userspace, except in pfctl

tested by naddy, ok deraadt

Revision 1.150 / (download) - annotate - [select for diffs], Mon Oct 21 15:10:29 2013 UTC (10 years, 7 months ago) by benno
Branch: MAIN
Changes since 1.149: +2 -2 lines
Diff to previous 1.149 (colored)

nuke comment. How soon is now?
"do it" deraadt@

Revision 1.149 / (download) - annotate - [select for diffs], Sat Oct 19 14:05:14 2013 UTC (10 years, 7 months ago) by reyk
Branch: MAIN
Changes since 1.148: +2 -3 lines
Diff to previous 1.148 (colored)

Bring back the if_detachhook.  We're going to have more users now.

ok mpi@ henning@ benno@

Revision 1.148 / (download) - annotate - [select for diffs], Sun Oct 13 10:10:02 2013 UTC (10 years, 7 months ago) by reyk
Branch: MAIN
Changes since 1.147: +3 -1 lines
Diff to previous 1.147 (colored)

Import vxlan(4), the virtual extensible local area network tunnel
interface.  VXLAN is a UDP-based tunnelling protocol for overlaying
virtualized layer 2 networks over layer 3 networks. The implementation
is based on draft-mahalingam-dutt-dcops-vxlan-04 and has been tested
with other implementations in the wild.

put it in deraadt@

Revision 1.147 / (download) - annotate - [select for diffs], Sat Oct 12 12:13:10 2013 UTC (10 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.146: +70 -30 lines
Diff to previous 1.146 (colored)

new bandwidth shaping subsystem, kernel side
uses hfsc behind the scenes; altq stays in parallel for a migration phase.
if.h even more messy for the transition, but eventuelly it should become
readable...
looked over & tested by many, ok phessler sthen

Revision 1.146 / (download) - annotate - [select for diffs], Tue Sep 17 13:34:17 2013 UTC (10 years, 8 months ago) by mpi
Branch: MAIN
Changes since 1.145: +3 -2 lines
Diff to previous 1.145 (colored)

Change vlan(4) detach procedure to not use a hook but a list of vlans
on the parent interface.  This is similar to what bridge(4), trunk(4)
or carp(4) are doing and allows us to get rid of the detachhook.

ok reyk@, mikeb@

Revision 1.145 / (download) - annotate - [select for diffs], Wed Aug 28 06:58:57 2013 UTC (10 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.144: +4 -4 lines
Diff to previous 1.144 (colored)

Remove unused argument from *rtrequest()

ok krw@, mikeb@

Revision 1.144 / (download) - annotate - [select for diffs], Thu Jun 20 12:03:40 2013 UTC (10 years, 11 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.143: +4 -5 lines
Diff to previous 1.143 (colored)

Revert previous and unbreak asr, the new include should be protected.

Reported by naddy@

Revision 1.143 / (download) - annotate - [select for diffs], Thu Jun 20 09:38:24 2013 UTC (10 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.142: +5 -4 lines
Diff to previous 1.142 (colored)

Allocate the various hook head descriptors as part of the ifnet
structure rather than doing various M_WAITOK allocations during
the *attach() functions, we always rely on them anyway.

ok mikeb@, uebayasi@

Revision 1.142 / (download) - annotate - [select for diffs], Tue Apr 2 08:54:37 2013 UTC (11 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.141: +2 -1 lines
Diff to previous 1.141 (colored)

Instead of storing the link-level address of every interface in a global
array indexed by interface numbers, add a new field to the interface
descriptor pointing to it.

claudio@ and todd@ like it, ok mikeb@

Revision 1.141 / (download) - annotate - [select for diffs], Tue Mar 26 13:19:25 2013 UTC (11 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.140: +1 -2 lines
Diff to previous 1.140 (colored)

Remove various read-only *maxlen variables and use IFQ_MAXLEN directly.

ok beck@, mikeb@

Revision 1.140 / (download) - annotate - [select for diffs], Wed Mar 20 10:34:12 2013 UTC (11 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.139: +2 -3 lines
Diff to previous 1.139 (colored)

Introduce if_get() to retrieve an interface descriptor pointer given
an interface index and replace all the redondant checks and accesses
to a global array by a call to this function.

With imputs from and ok bluhm@, mikeb@

Revision 1.139 / (download) - annotate - [select for diffs], Thu Mar 7 09:40:19 2013 UTC (11 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.138: +1 -2 lines
Diff to previous 1.138 (colored)

Remove unused ifa_ifwithaf() function.

ok mikeb@, miod@

Revision 1.138 / (download) - annotate - [select for diffs], Thu Mar 7 09:03:16 2013 UTC (11 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.137: +1 -9 lines
Diff to previous 1.137 (colored)

Remove the IFAFREE() macro, the ifafree() function it was calling already
check for the reference counter.

ok mikeb@, miod@, pelikan@, kettenis@, krw@

Revision 1.137 / (download) - annotate - [select for diffs], Fri Nov 23 20:12:03 2012 UTC (11 years, 6 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.136: +2 -1 lines
Diff to previous 1.136 (colored)

Add SIOCGIFHARDMTU to allow retrieving the driver's maximum supported MTU
looks fine reyk@ ok mikeb@

Revision 1.136 / (download) - annotate - [select for diffs], Sun Nov 11 04:45:37 2012 UTC (11 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.135: +8 -2 lines
Diff to previous 1.135 (colored)

align ifaliasreq.ifra_addr similar to the way that ifreq is fixed --
a gruesome union, to block the compiler from placing the struct
incorrectly aligned on stack frames
ok guenther

Revision 1.135 / (download) - annotate - [select for diffs], Fri Oct 5 17:17:04 2012 UTC (11 years, 7 months ago) by camield
Branch: MAIN
Changes since 1.134: +2 -2 lines
Diff to previous 1.134 (colored)

Point an interface directly to its bridgeport configuration, instead
of to the bridge itself.  This is ok, since an interface can only be part
of one bridge, and the parent bridge is easy to find from the bridgeport.

This way we can get rid of a lot of list walks, improving performance
and shortening the code.

ok henning stsp sthen reyk

Revision 1.134 / (download) - annotate - [select for diffs], Wed Sep 19 15:29:53 2012 UTC (11 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.133: +3 -0 lines
Diff to previous 1.133 (colored)

defina an IFCAP_CSUM_MASK, covering IFCAP_CSUM_*, and use it in if_vlan.c
to replace the list of them.
this actually makes vlan inherit the IPv6 CSUM flags from it's parent, that
had been commented out since this code was committed back in 2001.
ok benno mpf

Revision 1.133 / (download) - annotate - [select for diffs], Mon Sep 10 02:24:24 2012 UTC (11 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.132: +30 -21 lines
Diff to previous 1.132 (colored)

Bring into compliance with POSIX, exposing just the specified bits.

Requested by jasper@, ok kettenis@

Revision 1.132 / (download) - annotate - [select for diffs], Tue Aug 21 19:50:39 2012 UTC (11 years, 9 months ago) by bluhm
Branch: MAIN
Changes since 1.131: +2 -2 lines
Diff to previous 1.131 (colored)

Reverse the name and meaning of the IFXF_INET6_PRIVACY interface
flag.  It is now called IFXF_INET6_NOPRIVACY.  So IPv6 privacy
addresses are on by default without resetting the flag during
ifconfig down/up.
OK stsp@, sperreault@ (who wrote the same diff)

Revision 1.131 / (download) - annotate - [select for diffs], Fri Dec 2 03:15:31 2011 UTC (12 years, 6 months ago) by haesbaert
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.130: +1 -3 lines
Diff to previous 1.130 (colored)

Kill unused IFCAP_IPSEC and IFCAP_IPCOMP.

ok claudio@ henning@ mikeb@

Revision 1.130 / (download) - annotate - [select for diffs], Wed Nov 2 02:03:47 2011 UTC (12 years, 7 months ago) by haesbaert
Branch: MAIN
Changes since 1.129: +3 -4 lines
Diff to previous 1.129 (colored)

Expose if_capabilities to userland so that ifconfig can display the
device hardware features.
Tune ifconfig to show them with 'hwfeatures' argument.
While here, kill some old unused capabilities and respect 80 columns
in brconfig.h.

ok mcbride@, henning@, mpf@.

Revision 1.129 / (download) - annotate - [select for diffs], Fri Oct 7 17:10:08 2011 UTC (12 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.128: +3 -3 lines
Diff to previous 1.128 (colored)

rename some vars and functions
unfortunately altq is one giant namespace violation. rename just those that
conflict with new stuff for now only to be found on my laptop. reduce pain,
the diff is huge already. ok ryan

Revision 1.128 / (download) - annotate - [select for diffs], Fri Jul 8 18:48:51 2011 UTC (12 years, 10 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.127: +42 -22 lines
Diff to previous 1.127 (colored)

new priority queueing implementation, extremely low overhead, thus fast.
unconditional, always on. 8 priority levels, as every better switch, the
vlan header etc etc. ok ryan mpf sthen, pea tested as well

Revision 1.127 / (download) - annotate - [select for diffs], Thu Jul 7 20:41:36 2011 UTC (12 years, 10 months ago) by henning
Branch: MAIN
Changes since 1.126: +3 -1 lines
Diff to previous 1.126 (colored)

provide IF_LEN and IFQ_LEN to access ifq_len on an ifqueue, ryan ok

Revision 1.126 / (download) - annotate - [select for diffs], Tue Jul 5 00:58:27 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.125: +1 -2 lines
Diff to previous 1.125 (colored)

now of course I only noticed if_qflush is completely unused after
adjusting it to the new world order in my tree... remove it, ok ryan claudio

Revision 1.125 / (download) - annotate - [select for diffs], Sun Jul 3 23:12:29 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.124: +1 -14 lines
Diff to previous 1.124 (colored)

IFQ_CLASSIFY is also just schrapnel

Revision 1.124 / (download) - annotate - [select for diffs], Sun Jul 3 23:05:35 2011 UTC (12 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.123: +1 -3 lines
Diff to previous 1.123 (colored)

no traces of ALTQ_DECL to be found anywhere, thus kill the #defines

Revision 1.123 / (download) - annotate - [select for diffs], Sun Jul 3 17:41:50 2011 UTC (12 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.122: +3 -2 lines
Diff to previous 1.122 (colored)

LINK_STATE_IS_UP() should consider LINK_STATE_UNKNOWN as an up state.
This is now possible because carp no longer uses LINK_STATE_UNKNOWN
for a state that is considered down. This will simplify a lot of code.
OK mpf@ mcbride@ henning@

Revision 1.122 / (download) - annotate - [select for diffs], Sun Mar 13 15:31:41 2011 UTC (13 years, 2 months ago) by stsp
Branch: MAIN
Changes since 1.121: +4 -1 lines
Diff to previous 1.121 (colored)

Add a way to enable/disable Wake On LAN with ifconfig.
ok deraadt

Revision 1.121 / (download) - annotate - [select for diffs], Wed Nov 17 18:51:57 2010 UTC (13 years, 6 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.120: +3 -1 lines
Diff to previous 1.120 (colored)

introduce ifa_update_broadaddr to update an ifaddr's broadcast address,
trivial for the moment, more needed soon
tested by many as part of a larger diff, ok sthen claudio dlg krw

Revision 1.120 / (download) - annotate - [select for diffs], Fri Sep 24 13:29:29 2010 UTC (13 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.119: +2 -2 lines
Diff to previous 1.119 (colored)

Implement if_freenameindex() as a real function as required by posix.
OK deraadt@, millert@

Revision 1.119 / (download) - annotate - [select for diffs], Thu Sep 23 10:49:55 2010 UTC (13 years, 8 months ago) by dlg
Branch: MAIN
Changes since 1.118: +2 -2 lines
Diff to previous 1.118 (colored)

tweak the mclgeti algorithm to behave better under load.

instead of letting hardware rings grow on every interrupt, restrict
it so it can only grow once per softclock tick. we can only punish
the rings on softclock ticks, so it make sense to only grow on
softclock tick boundaries too.

the rings are now punished after >1 lost softclock tick rather than
>2. mclgeti is now more aggressive at detecting livelock.

the rings get punished by an 8th, rather than by half.

we now allow the rings to be punished again even if the system is
already considered in livelock.

without this diff a livelocked system will have its rx ring sizes
scale up and down very rapidly, while holding the rings low for too
long. this affected throughput significantly.

discussed and tested heavily at j2k10. there are still some games
with softnet we can play, but this is a good first step.

"put it in" and ok deraadt@
ok claudio@ krw@ henning@ mcbride@

if we find out that it sucks we can pull it out again later. till then
we'll run with it and see how it goes.

Revision 1.118 / (download) - annotate - [select for diffs], Fri Aug 27 17:08:01 2010 UTC (13 years, 9 months ago) by jsg
Branch: MAIN
Changes since 1.117: +1 -3 lines
Diff to previous 1.117 (colored)

remove the unused if_init callback in struct ifnet
ok deraadt@ henning@ claudio@

Revision 1.117 / (download) - annotate - [select for diffs], Sat Jun 26 19:49:54 2010 UTC (13 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.116: +7 -1 lines
Diff to previous 1.116 (colored)

Implement a simple keepalive mechanism in gre(4) that is compatible with
the one used by Cisco. It sends a return gre packet inside a gre packet
to the other side and expects it to return.
OK deraadt, reyk additional testing by sthen

Revision 1.116 / (download) - annotate - [select for diffs], Fri May 28 12:09:09 2010 UTC (14 years ago) by claudio
Branch: MAIN
Changes since 1.115: +6 -1 lines
Diff to previous 1.115 (colored)

Rework the way we handle MPLS in the kernel. Instead of fumbling MPLS into
ether_output() and later on other L2 output functions use a trick and over-
load the ifp->if_output() function pointer on MPLS enabled interfaces to
go through mpls_output() which will then call the link level output function.
By setting IFXF_MPLS on an interface the output pointers are switched.
This now allows to cleanup the MPLS input and output pathes and fix mpe(4)
so that the MPLS code now actually works for both P and PE systems.
Tested by myself and michele
(A custom kernel with MPLS and mpe enabled is still needed).

Revision 1.115 / (download) - annotate - [select for diffs], Sat Apr 17 17:46:32 2010 UTC (14 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.114: +2 -1 lines
Diff to previous 1.114 (colored)

split SIOCSIFLLADDR code out into an ifnewlladr() function
ok stsp

Revision 1.114 / (download) - annotate - [select for diffs], Tue Apr 6 14:12:10 2010 UTC (14 years, 2 months ago) by stsp
Branch: MAIN
Changes since 1.113: +4 -3 lines
Diff to previous 1.113 (colored)

Simple implementation of RFC4941, "Privacy Extensions for Stateless
Address Autoconfiguration in IPv6". For those among us who are paranoid
about broadcasting their MAC address to the IPv6 internet.

Man page help from jmc, testing by weerd, arc4random API hints from djm.

ok deraadt, claudio

Revision 1.113 / (download) - annotate - [select for diffs], Wed Jan 13 02:26:49 2010 UTC (14 years, 4 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.112: +10 -1 lines
Diff to previous 1.112 (colored)

maintain a global RB tree of all local addresses in the system. this
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

Revision 1.112 / (download) - annotate - [select for diffs], Wed Jan 13 02:13:12 2010 UTC (14 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.111: +3 -1 lines
Diff to previous 1.111 (colored)

instead of fiddling with the per-interface address lists directly in
many places create a proper API (ifa_add / ifa_del) and use it.
ok theo ryan dlg

Revision 1.111 / (download) - annotate - [select for diffs], Tue Jan 12 00:39:18 2010 UTC (14 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.110: +5 -3 lines
Diff to previous 1.110 (colored)

Make the structures for ifa_msghdr and friends even more like
the route messages so that people and compilers will not get
confused.
ok claudio

Revision 1.110 / (download) - annotate - [select for diffs], Thu Sep 17 13:27:24 2009 UTC (14 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.109: +1 -50 lines
Diff to previous 1.109 (colored)

Remove the comaptibility structures for routing socket version 3.
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.

Revision 1.109 / (download) - annotate - [select for diffs], Mon Sep 14 11:42:52 2009 UTC (14 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.108: +47 -6 lines
Diff to previous 1.108 (colored)

Add a way to convert the ifi_link_state to a string without the use of
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

Revision 1.108 / (download) - annotate - [select for diffs], Mon Aug 10 11:22:10 2009 UTC (14 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.107: +2 -1 lines
Diff to previous 1.107 (colored)

At sys_reboot time, bring all the interfaces down so that their xxstop
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

Revision 1.107 / (download) - annotate - [select for diffs], Sat Jun 6 12:31:17 2009 UTC (15 years ago) by rainer
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.106: +2 -2 lines
Diff to previous 1.106 (colored)

when xflags got changed, tell the userland by routing sockets

ok henning@

Revision 1.106 / (download) - annotate - [select for diffs], Fri Jun 5 00:05:21 2009 UTC (15 years ago) by claudio
Branch: MAIN
Changes since 1.105: +8 -6 lines
Diff to previous 1.105 (colored)

Initial support for routing domains. This allows to bind interfaces to
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@

Revision 1.105 / (download) - annotate - [select for diffs], Thu Jun 4 19:07:21 2009 UTC (15 years ago) by henning
Branch: MAIN
Changes since 1.104: +5 -1 lines
Diff to previous 1.104 (colored)

allow IPvShit to be turned off completely per-interface.
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

Revision 1.104 / (download) - annotate - [select for diffs], Wed Jun 3 20:35:37 2009 UTC (15 years ago) by beck
Branch: MAIN
Changes since 1.103: +5 -1 lines
Diff to previous 1.103 (colored)

make wireless interfaces priority 4 by default. other interfaces remain
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@

Revision 1.103 / (download) - annotate - [select for diffs], Tue Jan 27 09:17:51 2009 UTC (15 years, 4 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored)

make drivers tell the mclgeti allocator what their maximum ring size is
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@

Revision 1.102 / (download) - annotate - [select for diffs], Fri Dec 12 22:07:33 2008 UTC (15 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.101: +2 -1 lines
Diff to previous 1.101 (colored)

Introduce a if_priority that will be added to RTP_STATIC when routes are
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@

Revision 1.101 / (download) - annotate - [select for diffs], Thu Dec 11 16:45:45 2008 UTC (15 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.100: +13 -14 lines
Diff to previous 1.100 (colored)

export per-interface mbuf cluster pool use statistics out to userland
inside if_data, so that netstat(1) and systat(1) can see them
ok dlg

Revision 1.100 / (download) - annotate - [select for diffs], Sun Nov 30 00:14:42 2008 UTC (15 years, 6 months ago) by brad
Branch: MAIN
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

- Remove unused if_reset "bus reset routine" field in the ifnet struct.
- Add if_stop "stop routine" field in the ifnet struct.

ok mglocker@

Revision 1.99 / (download) - annotate - [select for diffs], Wed Nov 26 17:36:23 2008 UTC (15 years, 6 months ago) by dlg
Branch: MAIN
Changes since 1.98: +2 -2 lines
Diff to previous 1.98 (colored)

provide m_clsetlwm, an interface for an interface to raise its low
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@

Revision 1.98 / (download) - annotate - [select for diffs], Tue Nov 25 12:47:00 2008 UTC (15 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.97: +3 -1 lines
Diff to previous 1.97 (colored)

Factor increases are not needed, +1 appears to work as well.
ok dlg

Revision 1.97 / (download) - annotate - [select for diffs], Mon Nov 24 14:26:54 2008 UTC (15 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.96: +3 -1 lines
Diff to previous 1.96 (colored)

move MCLPOOLS to if.h and force uipc_mbuf.c to get if.h, there is no
other option
ok dlg

Revision 1.96 / (download) - annotate - [select for diffs], Mon Nov 24 12:57:37 2008 UTC (15 years, 6 months ago) by dlg
Branch: MAIN
Changes since 1.95: +10 -1 lines
Diff to previous 1.95 (colored)

add several backend pools to allocate mbufs clusters of various sizes out
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@

Revision 1.95 / (download) - annotate - [select for diffs], Fri Nov 7 05:50:33 2008 UTC (15 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.94: +16 -14 lines
Diff to previous 1.94 (colored)

give this some /* CONSTCOND */ love

Revision 1.94 / (download) - annotate - [select for diffs], Thu Apr 10 23:15:45 2008 UTC (16 years, 1 month ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.93: +5 -0 lines
Diff to previous 1.93 (colored)

introduce mitigation for the calling of an interfaces start routine.

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.

Revision 1.93 / (download) - annotate - [select for diffs], Sun Nov 18 12:51:48 2007 UTC (16 years, 6 months ago) by mpf
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.92: +2 -1 lines
Diff to previous 1.92 (colored)

Sync struct ifaltq to match struct ifqueue.
I wonder why 64-bit archs have not been bitten by this.
OK mcbride@, henning@

Revision 1.92 / (download) - annotate - [select for diffs], Mon Sep 3 15:24:49 2007 UTC (16 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.91: +83 -25 lines
Diff to previous 1.91 (colored)

Bump RTM_VERSION to 4 and start a new aera of routing in OpenBSD :)
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@

Revision 1.91 / (download) - annotate - [select for diffs], Mon Jun 25 16:37:58 2007 UTC (16 years, 11 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored)

crank ifq_maxlen from 50 to 256, so it is not smaller than most interfaces
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

Revision 1.90 / (download) - annotate - [select for diffs], Thu Jun 14 18:31:49 2007 UTC (16 years, 11 months ago) by reyk
Branch: MAIN
Changes since 1.89: +2 -1 lines
Diff to previous 1.89 (colored)

Add a new "rtlabel" option to ifconfig. It allows to specify a route label
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@

Revision 1.89 / (download) - annotate - [select for diffs], Tue May 29 18:18:57 2007 UTC (17 years ago) by uwe
Branch: MAIN
Changes since 1.88: +40 -36 lines
Diff to previous 1.88 (colored)

Define IF_ENQUEUE() and friends as proper C statements using do ... while
ok henning

Revision 1.88 / (download) - annotate - [select for diffs], Sat May 26 17:13:30 2007 UTC (17 years ago) by jason
Branch: MAIN
Changes since 1.87: +2 -1 lines
Diff to previous 1.87 (colored)

one extern seems to be better than 20 for ifqmaxlen; ok krw

Revision 1.87 / (download) - annotate - [select for diffs], Tue Mar 27 11:22:59 2007 UTC (17 years, 2 months ago) by jmc
Branch: MAIN
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored)

grammar from bret lambert, and one more from me;

Revision 1.86 / (download) - annotate - [select for diffs], Fri Feb 9 09:16:59 2007 UTC (17 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

grammar fix from bret lambert;

Revision 1.85 / (download) - annotate - [select for diffs], Tue Nov 28 19:21:15 2006 UTC (17 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.84: +4 -1 lines
Diff to previous 1.84 (colored)

add additional link states to report the half duplex / full duplex
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@

Revision 1.84 / (download) - annotate - [select for diffs], Thu Nov 16 13:09:27 2006 UTC (17 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.83: +2 -1 lines
Diff to previous 1.83 (colored)

introduce if_creategroup() to create an empty interface group.
code factored out from if_addgroup(), previously a group always had to have
members. ok mpf mcbride

Revision 1.83 / (download) - annotate - [select for diffs], Tue Oct 31 14:28:29 2006 UTC (17 years, 7 months ago) by jason
Branch: MAIN
Changes since 1.82: +3 -2 lines
Diff to previous 1.82 (colored)

ether_input_mbuf() isn't necessary, turn it into a macro and deal with
it's "special" case in ether_input().  Based on similiar idea in FreeBSD.
ok brad

Revision 1.82 / (download) - annotate - [select for diffs], Fri Jun 2 19:53:12 2006 UTC (18 years ago) by mpf
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.81: +10 -3 lines
Diff to previous 1.81 (colored)

Introduce attributes to interface groups.
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@

Revision 1.81 / (download) - annotate - [select for diffs], Sat May 27 10:03:15 2006 UTC (18 years ago) by brad
Branch: MAIN
Changes since 1.80: +5 -6 lines
Diff to previous 1.80 (colored)

remove IFCAP_JUMBO_MTU interface capabilities flag and set if_hardmtu in a few
more drivers.

ok reyk@

Revision 1.80 / (download) - annotate - [select for diffs], Fri May 26 20:50:41 2006 UTC (18 years ago) by deraadt
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

rename jumbo mtu to if_hardmtu; ok brad reyk

Revision 1.79 / (download) - annotate - [select for diffs], Fri May 19 19:50:23 2006 UTC (18 years ago) by reyk
Branch: MAIN
Changes since 1.78: +3 -2 lines
Diff to previous 1.78 (colored)

add a if_jumbo_mtu field to the interface structure for drivers
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@

Revision 1.78 / (download) - annotate - [select for diffs], Sat Mar 4 22:40:15 2006 UTC (18 years, 3 months ago) by brad
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

With the exception of two other small uncommited diffs this moves
the remainder of the network stack from splimp to splnet.

ok miod@

Revision 1.77 / (download) - annotate - [select for diffs], Thu Feb 9 00:05:55 2006 UTC (18 years, 3 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (colored)

add an interface detach hook and use it with the vlan(4) driver. this
fixes a possible crash if the parent interface has been destroyed
(like vlan on trunk) before destroying the vlan interface.

ok brad@

Revision 1.76 / (download) - annotate - [select for diffs], Tue Jun 14 04:00:39 2005 UTC (18 years, 11 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

rename function and define to reflect the external -> egress name change
so it is clear what it is all about

Revision 1.75 / (download) - annotate - [select for diffs], Tue Jun 14 03:54:31 2005 UTC (18 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

use "egress" instead of "external" for the interface group containing the
interfaces the default route(s) point to, proposed deraadt some days ago,
ok djm deraadt

Revision 1.74 / (download) - annotate - [select for diffs], Sun Jun 12 00:41:33 2005 UTC (18 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.73: +7 -3 lines
Diff to previous 1.73 (colored)

add SIOCGIFGMEMB ioctl, returns a list of all interfaces who are member of
the given group, markus ok

Revision 1.73 / (download) - annotate - [select for diffs], Tue Jun 7 18:21:44 2005 UTC (18 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.72: +4 -2 lines
Diff to previous 1.72 (colored)

introduce a default "external" interface group, containing the interface(s)
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

Revision 1.72 / (download) - annotate - [select for diffs], Mon Jun 6 03:44:21 2005 UTC (19 years ago) by henning
Branch: MAIN
Changes since 1.71: +4 -1 lines
Diff to previous 1.71 (colored)

use a define instead of hardcoding "all" in 3 places

Revision 1.71 / (download) - annotate - [select for diffs], Sun Jun 5 20:49:25 2005 UTC (19 years ago) by henning
Branch: MAIN
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

const'ify the char *groupname param to if_addgroup and if_delgroup

Revision 1.70 / (download) - annotate - [select for diffs], Tue May 24 04:20:25 2005 UTC (19 years ago) by markus
Branch: MAIN
Changes since 1.69: +19 -1 lines
Diff to previous 1.69 (colored)

add net.inet.ip.ifq for monitoring and changing ifqueue; similar to netbsd
ok henning

Revision 1.69 / (download) - annotate - [select for diffs], Tue May 24 02:45:17 2005 UTC (19 years ago) by reyk
Branch: MAIN
Changes since 1.68: +2 -1 lines
Diff to previous 1.68 (colored)

initial import of a trunking (link aggregation and link failover)
implementation. it currently supports round robin mode with link state
checking, additional modes will be added later.

ok brad@, deraadt@

Revision 1.68 / (download) - annotate - [select for diffs], Tue May 24 02:26:04 2005 UTC (19 years ago) by henning
Branch: MAIN
Changes since 1.67: +11 -5 lines
Diff to previous 1.67 (colored)

keep a list of member interfaces in ifg_group

Revision 1.67 / (download) - annotate - [select for diffs], Sun May 22 18:23:04 2005 UTC (19 years ago) by henning
Branch: MAIN
Changes since 1.66: +2 -1 lines
Diff to previous 1.66 (colored)

allow pf to match on interface groups
pass on mygroup ...
markus ok

Revision 1.66 / (download) - annotate - [select for diffs], Sat May 21 21:03:57 2005 UTC (19 years ago) by henning
Branch: MAIN
Changes since 1.65: +2 -1 lines
Diff to previous 1.65 (colored)

clean up and rework the interface absraction code big time, rip out multiple
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

Revision 1.65 / (download) - annotate - [select for diffs], Wed Apr 20 23:00:40 2005 UTC (19 years, 1 month ago) by mpf
Branch: MAIN
Changes since 1.64: +2 -1 lines
Diff to previous 1.64 (colored)

Introduce if_linkstatehooks.
This converts if_link_state_change() to a generic usable
callback with dohooks().

OK henning@, camield@
Tested by camield@ and Alexey E. Suslikov

Revision 1.64 / (download) - annotate - [select for diffs], Mon Feb 7 15:00:17 2005 UTC (19 years, 3 months ago) by mcbride
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.63: +2 -1 lines
Diff to previous 1.63 (colored)

Add new function if_link_state_change() to take care of sending messages
on the routing socket and notifying carp() of link changes.

ok brad@ mpf@

Revision 1.63 / (download) - annotate - [select for diffs], Fri Jan 14 11:49:01 2005 UTC (19 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.62: +1 -16 lines
Diff to previous 1.62 (colored)

remove old ifgroups ioctls
the old ifgroups haven't been in use ever really, and the new
implementation is 3 months old today. theo ok (3 months ago)

Revision 1.62 / (download) - annotate - [select for diffs], Tue Dec 7 20:38:46 2004 UTC (19 years, 5 months ago) by mcbride
Branch: MAIN
Changes since 1.61: +7 -2 lines
Diff to previous 1.61 (colored)

Convert carp(4) to behave more like a regular interface, much in the same
style as vlan(4). carp interfaces no longer require the physical interface
to be on the same subnet as the carp interface, or even that the physical
interface has an adress at all, so CARP can now be used on /30 networks.

ok deraadt@ henning@

Revision 1.61 / (download) - annotate - [select for diffs], Tue Dec 7 19:26:46 2004 UTC (19 years, 5 months ago) by mcbride
Branch: MAIN
Changes since 1.60: +5 -5 lines
Diff to previous 1.60 (colored)

KNF

Revision 1.60 / (download) - annotate - [select for diffs], Fri Dec 3 17:31:03 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

do not use one struct timeout for the if congestion stuff, but embed
a struct timeout to struct ifqueue so that each one has its own - it
is a per-queue thing. from chris pascoe

Revision 1.59 / (download) - annotate - [select for diffs], Wed Nov 10 21:10:53 2004 UTC (19 years, 6 months ago) by grange
Branch: MAIN
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

Safer IF_INPUT_ENQUEUE macro.

ok millert@

Revision 1.58 / (download) - annotate - [select for diffs], Thu Oct 14 21:28:15 2004 UTC (19 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.57: +1 -3 lines
Diff to previous 1.57 (colored)

avoid stupid commons

Revision 1.57 / (download) - annotate - [select for diffs], Mon Oct 11 10:13:49 2004 UTC (19 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.56: +36 -9 lines
Diff to previous 1.56 (colored)

ifgroups reqrite
there is now a TAILQ with all interface groups as members, and
in struct ofnet there is only a pointer to the group structure stored
and not its name.
mostly hacked at c2k4 and somewhere over the atlantic ocean
ok markus mcbride

Revision 1.56 / (download) - annotate - [select for diffs], Sat Jun 26 17:36:33 2004 UTC (19 years, 11 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.55: +10 -13 lines
Diff to previous 1.55 (colored)

cleanup ioctl for ifgroups; ok pb@

Revision 1.55 / (download) - annotate - [select for diffs], Fri Jun 25 18:24:23 2004 UTC (19 years, 11 months ago) by pb
Branch: MAIN
Changes since 1.54: +30 -1 lines
Diff to previous 1.54 (colored)

introduce "interface groups"

by "ifconfig fxp0 group foobar" "ifconfig xl0 group foobar"
these two interfaces are in one group.
Every interface has its if-family as default group.

idea/design from henning@, based on some work/disucssion from Joris Vink.

henning@, mcbride@ ok.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Jun 20 00:38:21 2004 UTC (19 years, 11 months ago) by beck
Branch: MAIN
Changes since 1.53: +9 -22 lines
Diff to previous 1.53 (colored)

undo mbuf cluster breakage that causes free'ed packets to show up on the
input queues when using dhcp and hostap wi, or xl, or fxp....
ok art@

Revision 1.15.2.10 / (download) - annotate - [select for diffs], Sat Jun 5 23:11:23 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.15.2.9: +38 -0 lines
Diff to previous 1.15.2.9 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

Merge with the trunk

Revision 1.53 / (download) - annotate - [select for diffs], Sat May 29 17:54:45 2004 UTC (20 years ago) by jcs
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A
Changes since 1.52: +7 -1 lines
Diff to previous 1.52 (colored)

introduce SIOCSIFDESCR and SIOCGIFDESCR to maintain interface
descriptions, configurable with ifconfig

help from various, ok deraadt@

Revision 1.52 / (download) - annotate - [select for diffs], Tue May 18 21:10:14 2004 UTC (20 years ago) by brad
Branch: MAIN
Changes since 1.51: +6 -1 lines
Diff to previous 1.51 (colored)

if_ether.h
add ETHER_MAX_LEN_JUMBO, ETHER_VLAN_ENCAP_LEN, ETHER_ALIGN, and
ETHERMTU_JUMBO constants.

if.h
add a few more interface capabilities flags.

Some from NetBSD, some from FreeBSD.

ok markus@

Revision 1.51 / (download) - annotate - [select for diffs], Mon Apr 26 05:24:00 2004 UTC (20 years, 1 month ago) by mcbride
Branch: MAIN
Changes since 1.50: +22 -9 lines
Diff to previous 1.50 (colored)

Before enqueueing the packet, copy the contents of incoming clusters
to the mbuf and free the cluster when it contains a small packet.

ok deraadt@

Revision 1.50 / (download) - annotate - [select for diffs], Sat Apr 17 00:09:01 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.49: +15 -1 lines
Diff to previous 1.49 (colored)

add a congestion indicator to if_queue. It is set when the input queue
is full, along with a timer that unsets it again after 10ms.
The input queue beeing full is a reliable indicator for CPU overload, and
this flag allows other subsystems to cope with the situation.
hacked with beck
ok kjc@ markus@ beck@

Revision 1.15.2.9 / (download) - annotate - [select for diffs], Thu Feb 19 10:57:21 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.15.2.8: +52 -3 lines
Diff to previous 1.15.2.8 (colored) to branchpoint 1.15 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.49 / (download) - annotate - [select for diffs], Thu Jan 15 10:47:55 2004 UTC (20 years, 4 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.48: +17 -1 lines
Diff to previous 1.48 (colored)

add a RTM_IFANNOUNCE message; from netbsd; ok itojun, henning

Revision 1.48 / (download) - annotate - [select for diffs], Tue Dec 16 20:33:25 2003 UTC (20 years, 5 months ago) by markus
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

return error in ifc_destroy; ok deraadt, itojun, cedric, hshoexer

Revision 1.47 / (download) - annotate - [select for diffs], Wed Dec 10 03:30:21 2003 UTC (20 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

use if_indexlim (instead of if_index) and ifindex2ifnet[x] != NULL
to check if interface exists, as (1) if_index will have different meaning
(2) ifindex2ifnet could become NULL when interface gets destroyed,
when we introduce dynamically-created interfaces.  markus ok

Revision 1.46 / (download) - annotate - [select for diffs], Mon Dec 8 09:09:03 2003 UTC (20 years, 5 months ago) by markus
Branch: MAIN
Changes since 1.45: +10 -1 lines
Diff to previous 1.45 (colored)

add IOCIFGCLONERS; ifconfig -C; from netbsd; ok henning, deraadt

Revision 1.45 / (download) - annotate - [select for diffs], Wed Dec 3 13:27:36 2003 UTC (20 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.44: +23 -2 lines
Diff to previous 1.44 (colored)

support for network interface "cloning", e.g. gif(4) via ifconfig(8)

Revision 1.44 / (download) - annotate - [select for diffs], Sun Oct 19 03:58:25 2003 UTC (20 years, 7 months ago) by david
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

more typos

Revision 1.43 / (download) - annotate - [select for diffs], Fri Oct 17 21:04:58 2003 UTC (20 years, 7 months ago) by mcbride
Branch: MAIN
Changes since 1.42: +2 -1 lines
Diff to previous 1.42 (colored)

Common Address Redundancy Protocol

Allows multiple hosts to share an IP address, providing high availability
and load balancing.

Based on code by mickey@, with additional help from markus@
and Marco_Pfatschbacher@genua.de

ok deraadt@

Revision 1.42 / (download) - annotate - [select for diffs], Mon Aug 25 08:18:54 2003 UTC (20 years, 9 months ago) by fgsch
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.41: +2 -0 lines
Diff to previous 1.41 (colored)

if_init support, required by ieee80211.
deraadt@ ok.

Revision 1.15.2.8 / (download) - annotate - [select for diffs], Sat Jun 7 11:06:06 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.15.2.7: +2 -6 lines
Diff to previous 1.15.2.7 (colored) to branchpoint 1.15 (colored)

Sync SMP branch to -current

Revision 1.41 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:11 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.40: +2 -6 lines
Diff to previous 1.40 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.15.2.7 / (download) - annotate - [select for diffs], Fri Mar 28 00:41:28 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.15.2.6: +11 -19 lines
Diff to previous 1.15.2.6 (colored) to branchpoint 1.15 (colored)

Sync the SMP branch with 3.3

Revision 1.31.4.3 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:45 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.31.4.2: +8 -20 lines
Diff to previous 1.31.4.2 (colored) to branchpoint 1.31 (colored) next main 1.32 (colored)

sync to -current

Revision 1.40 / (download) - annotate - [select for diffs], Wed Jul 3 21:19:08 2002 UTC (21 years, 11 months ago) by miod
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.39: +5 -5 lines
Diff to previous 1.39 (colored)

Change all variables definitions (int foo) in sys/sys/*.h to variable
declarations (extern int foo), and compensate in the appropriate locations.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jun 30 13:04:35 2002 UTC (21 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.38: +4 -1 lines
Diff to previous 1.38 (colored)

allocate sockaddr_dl for ifnet in if_alloc_sadl(), as we don't always know
the size of sockaddr_dl on if_attach() - for instance, see ether_ifattach().
from netbsd.  fgs ok

Revision 1.38 / (download) - annotate - [select for diffs], Sun Jun 23 23:55:04 2002 UTC (21 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.37: +1 -16 lines
Diff to previous 1.37 (colored)

g/c last remains of old ipv6 prefix management

Revision 1.31.4.2 / (download) - annotate - [select for diffs], Tue Jun 11 03:30:45 2002 UTC (21 years, 11 months ago) by art
Branch: UBC
Changes since 1.31.4.1: +59 -55 lines
Diff to previous 1.31.4.1 (colored) to branchpoint 1.31 (colored)

Sync UBC branch to -current

Revision 1.37 / (download) - annotate - [select for diffs], Mon May 27 13:42:16 2002 UTC (22 years ago) by itojun
Branch: MAIN
Changes since 1.36: +2 -1 lines
Diff to previous 1.36 (colored)

if_attach() gets called before domaininit().  scan all interfaces for if_afdata
initialization after domaininit().

Revision 1.36 / (download) - annotate - [select for diffs], Mon May 27 02:59:40 2002 UTC (22 years ago) by itojun
Branch: MAIN
Changes since 1.35: +3 -1 lines
Diff to previous 1.35 (colored)

framework to add af-dependent data structure to struct ifnet.
as discussed at bsd-api-discuss.  sync w/kame

Revision 1.35 / (download) - annotate - [select for diffs], Wed Apr 24 00:51:51 2002 UTC (22 years, 1 month ago) by dhartmei
Branch: MAIN
Changes since 1.34: +2 -1 lines
Diff to previous 1.34 (colored)

Add hooks to struct ifnet that allow to register callbacks that will be
notified of interface address changes. ok provos@, angelos@

Revision 1.15.2.6 / (download) - annotate - [select for diffs], Thu Mar 28 14:57:36 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.15.2.5: +54 -54 lines
Diff to previous 1.15.2.5 (colored) to branchpoint 1.15 (colored)

Merge in -current from roughly a week ago

Revision 1.34 / (download) - annotate - [select for diffs], Fri Mar 15 01:20:04 2002 UTC (22 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.33: +13 -7 lines
Diff to previous 1.33 (colored)

Cosmetic changes only, primarily making comments line up nicely after the
__P removal.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:09 2002 UTC (22 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.32: +49 -55 lines
Diff to previous 1.32 (colored)

First round of __P removal in sys

Revision 1.15.2.5 / (download) - annotate - [select for diffs], Wed Mar 6 02:15:06 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.15.2.4: +3 -3 lines
Diff to previous 1.15.2.4 (colored) to branchpoint 1.15 (colored)

Merge in trunk

Revision 1.31.4.1 / (download) - annotate - [select for diffs], Thu Jan 31 22:55:43 2002 UTC (22 years, 4 months ago) by niklas
Branch: UBC
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

Merge in -current, builds on i386, otherwise untested

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jan 23 19:16:09 2002 UTC (22 years, 4 months ago) by fgsch
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

compatability -> compatibility.

Revision 1.15.2.4 / (download) - annotate - [select for diffs], Wed Oct 31 03:29:02 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.15.2.3: +2 -1 lines
Diff to previous 1.15.2.3 (colored) to branchpoint 1.15 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jul 5 08:34:46 2001 UTC (22 years, 11 months ago) by angelos
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0
Branch point for: UBC
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

KNF

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jul 5 08:27:38 2001 UTC (22 years, 11 months ago) by jjbg
Branch: MAIN
Changes since 1.29: +2 -1 lines
Diff to previous 1.29 (colored)

Include files for IPComp support. angelos@ ok.

Revision 1.15.2.3 / (download) - annotate - [select for diffs], Wed Jul 4 10:53:53 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.15.2.2: +149 -12 lines
Diff to previous 1.15.2.2 (colored) to branchpoint 1.15 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jun 27 05:50:06 2001 UTC (22 years, 11 months ago) by kjc
Branch: MAIN
Changes since 1.28: +131 -8 lines
Diff to previous 1.28 (colored)

ALTQ base modifications to the kernel.
 - ALTQ introduces a set of new queue macros that coexist with the
   traditional IF_XXX macros.
 - "struct ifaltq" replaces "struct ifqueue" in "struct ifnet".
 - assign cdev major 74 for i386 and 54 for alpha as ALTQ control interface.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Jun 23 22:52:51 2001 UTC (22 years, 11 months ago) by fgsch
Branch: MAIN
Changes since 1.27: +2 -1 lines
Diff to previous 1.27 (colored)

Add ether_input_mbuf to help us remove the ether_header from
ether_input; all drivers should start migrating to this.
Discussed with jason@, deraadt@ more or les ok'ed.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Jun 15 03:38:33 2001 UTC (22 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.
follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific
interfaces only).

was: if_lastchange get updated on every packet transmission/receipt.
now: if_lastchange get updated when IFF_UP is changed.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Jun 9 06:16:37 2001 UTC (22 years, 11 months ago) by angelos
Branch: MAIN
Changes since 1.25: +5 -1 lines
Diff to previous 1.25 (colored)

By popular demand, protect from multiple inclusion, and fix to use the
same naming style.

Revision 1.25 / (download) - annotate - [select for diffs], Mon May 28 10:29:21 2001 UTC (23 years ago) by angelos
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

IPSECv4 -> IPSEC

Revision 1.24 / (download) - annotate - [select for diffs], Mon May 28 05:52:51 2001 UTC (23 years ago) by angelos
Branch: MAIN
Changes since 1.23: +4 -5 lines
Diff to previous 1.23 (colored)

No need for separate ESP/AH interface capabilities.

Revision 1.23 / (download) - annotate - [select for diffs], Mon May 28 05:16:27 2001 UTC (23 years ago) by angelos
Branch: MAIN
Changes since 1.22: +14 -4 lines
Diff to previous 1.22 (colored)

Interface capabilities (based on NetBSD, but merge ethercom and ifnet
capabilities into one, in the ifp).

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Mon May 14 22:39:59 2001 UTC (23 years ago) by niklas
Branch: SMP
Changes since 1.15.2.1: +24 -8 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.22 / (download) - annotate - [select for diffs], Tue Feb 6 00:22:22 2001 UTC (23 years, 4 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.21: +2 -4 lines
Diff to previous 1.21 (colored)

allow changing number of loopbacks in ukc.
change rest of the code to use lo0ifp pointing
to the corresponding struct ifnet.
itojun@ and niklas@ ok

Revision 1.21 / (download) - annotate - [select for diffs], Fri Jan 19 06:37:36 2001 UTC (23 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.20: +5 -4 lines
Diff to previous 1.20 (colored)

pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2 (UCB copyrighted).

have sys/net/route.c:rtrequest1(), which takes rt_addrinfo * as the argument.
pass rt_addrinfo all the way down to rtrequest, and ifa->ifa_rtrequest.
3rd arg of ifa->ifa_rtrequest is now rt_addrinfo * instead of sockaddr *
(almost noone is using it anyways).

benefit: the follwoing command now works.  previously we need two route(8)
invocations, "add" then "change".
# route add -inet6 default ::1 -ifp gif0

remove unsafe typecast in rtrequest(), from rtentry * to sockaddr *.  it was
introduced by 4.3BSD-reno and never corrected.

XXX is eon_rtrequest() change correct regarding to 3rd arg?
eon_rtrequest() and rtrequest() were incorrect since 4.3BSD-reno,
so i do not have correct answer in the source code.
someone with more clue about netiso-over-ip, please help.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Sep 20 13:07:25 2000 UTC (23 years, 8 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Since ifa_refcnt was bumped to an int and rt_flags is an int too, bump
ifa_flags to int.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Aug 28 18:30:38 2000 UTC (23 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

changing the size of if_data has heavy impact on userland compat.  there
was even a u_char slot available for ifi_link_state, which clearly does not
need a full 32 bits.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Aug 26 20:04:16 2000 UTC (23 years, 9 months ago) by nate
Branch: MAIN
Changes since 1.17: +18 -1 lines
Diff to previous 1.17 (colored)

sync mii code with netbsd
adds detach functionality for phys
some code cleanup

Nobody really had time to test all of this out, but theo said commit anyway

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Fri Mar 24 09:09:31 2000 UTC (24 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Sync with -current

Revision 1.17 / (download) - annotate - [select for diffs], Wed Mar 22 11:28:42 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.16: +1 -2 lines
Diff to previous 1.16 (colored)

remove if_withname(), which was imported during KAME merge by mistake.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Mar 21 23:31:26 2000 UTC (24 years, 2 months ago) by mickey
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

add SIOCGIFMTU/SIOCSIFMTU; remediate redundant code of tun, ppp, sppp; chris@ ok

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 2 17:14:36 2000 UTC (24 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: SMP_BASE
Branch point for: SMP
Changes since 1.14: +4 -3 lines
Diff to previous 1.14 (colored)

wrap IFAFREE() by "do {} while (0)".  it wasn't safe enough.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Dec 8 06:50:17 1999 UTC (24 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: kame_19991208
Changes since 1.13: +40 -3 lines
Diff to previous 1.13 (colored)

bring in KAME IPv6 code, dated 19991208.
replaces NRL IPv6 layer.  reuses NRL pcb layer.  no IPsec-on-v6 support.
see sys/netinet6/{TODO,IMPLEMENTATION} for more details.

GENERIC configuration should work fine as before.  GENERIC.v6 works fine
as well, but you'll need KAME userland tools to play with IPv6 (will be
bringed into soon).

Revision 1.13 / (download) - annotate - [select for diffs], Sun Aug 8 00:43:00 1999 UTC (24 years, 10 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.12: +3 -1 lines
Diff to previous 1.12 (colored)

Support detaching of network interfaces.  Still work to do in ipf, and
other families than inet.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 23 21:55:28 1999 UTC (24 years, 11 months ago) by cmetz
Branch: MAIN
Changes since 1.11: +12 -1 lines
Diff to previous 1.11 (colored)

Added some protocol independent interfaces (supposedly IPv6 support APIs, but
ones that are useful for all protocols, not just IPv6).

Revision 1.11 / (download) - annotate - [select for diffs], Sat Mar 13 19:06:16 1999 UTC (25 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

make ifa_refcnt a u_int; andrewb@demon.net

Revision 1.10 / (download) - annotate - [select for diffs], Fri Feb 26 17:01:31 1999 UTC (25 years, 3 months ago) by jason
Branch: MAIN
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored)

Ethernet bridge/IP firewall driver.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jan 7 06:03:28 1999 UTC (25 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +4 -3 lines
Diff to previous 1.8 (colored)

fix IFAFREE() to be safe for if/else nesting

Revision 1.8 / (download) - annotate - [select for diffs], Thu Sep 3 06:24:20 1998 UTC (25 years, 9 months ago) by jason
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.7: +13 -1 lines
Diff to previous 1.7 (colored)

o OpenBSD gets if_media support (from NetBSD)
o rework/simplify if_xl to use it

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 2 06:52:04 1996 UTC (27 years, 11 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored)

-Wall & -Wstrict-prototype fixes

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jun 29 18:54:10 1996 UTC (27 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

provide if_attachhead(), and make if_loop use it

Revision 1.5 / (download) - annotate - [select for diffs], Fri May 10 12:31:07 1996 UTC (28 years ago) by deraadt
Branch: MAIN
Changes since 1.4: +11 -6 lines
Diff to previous 1.4 (colored)

if_name/if_unit -> if_xname/if_softc

Revision 1.4 / (download) - annotate - [select for diffs], Mon May 6 05:43:43 1996 UTC (28 years, 1 month ago) by mickey
Branch: MAIN
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored)

if.h was missed from the commit.
if_ethersubr.c: missed variables added.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Mar 5 15:44:23 1996 UTC (28 years, 3 months ago) by mickey
Branch: MAIN
Changes since 1.2: +3 -2 lines
Diff to previous 1.2 (colored)

Changes for ifconfig to compile.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 3 21:07:06 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.1: +4 -2 lines
Diff to previous 1.1 (colored)

From NetBSD: 960217 merge

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:53:05 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:53:05 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.