History log of /openbsd/sys/net/if.h (Results 1 – 25 of 216)
Revision Date Author Comments
# 4733ced3 11-Apr-2024 bluhm <bluhm@openbsd.org>

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

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@

show more ...


# 9015f35c 11-Nov-2023 bluhm <bluhm@openbsd.org>

Pass constant struct sockaddr to interface lookup functions.

OK mvs@


# c5f97695 30-May-2023 dlg <dlg@openbsd.org>

add net_tq_barriers

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

ok claudio@


# cd9af87c 16-May-2023 jan <jan@openbsd.org>

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

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

show more ...


# 510f4386 15-May-2023 bluhm <bluhm@openbsd.org>

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
lay

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@

show more ...


# b774f285 07-Mar-2023 jan <jan@openbsd.org>

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

with tweaks from claudio and deraadt

ok claudio, bluhm


# 24e9bd86 27-Feb-2023 jan <jan@openbsd.org>

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

ok bluhm@, claudio@


# bde39c35 27-Jun-2022 jan <jan@openbsd.org>

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


# 4d35d720 11-Mar-2021 florian <florian@openbsd.org>

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 "tempora

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

show more ...


# 140dd23c 20-Feb-2021 dlg <dlg@openbsd.org>

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 i

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@

show more ...


# 8ea6f4e4 01-Feb-2021 mvs <mvs@openbsd.org>

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

ok bluhm@ dlg@


# 3106ab34 18-Jan-2021 mvs <mvs@openbsd.org>

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 th

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@

show more ...


# 73c7e8bc 30-Sep-2020 mvs <mvs@openbsd.org>

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

ok deraadt@ claudio@


# 3ddd2757 25-Jul-2019 krw <krw@openbsd.org>

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

pointed out by claudio@


# 367b0a2e 25-Jul-2019 krw <krw@openbsd.org>

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

ok deraadt@ kmos@


# 83d43ce9 19-Apr-2019 dlg <dlg@openbsd.org>

add IF_HDRPRIO_OUTER for rxprio

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

ok claudio@


# 1bf95855 10-Apr-2019 dlg <dlg@openbsd.org>

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
m

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@

show more ...


# e4d551d4 23-Jan-2019 dlg <dlg@openbsd.org>

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

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@

show more ...


# fd0d2181 12-Nov-2018 dlg <dlg@openbsd.org>

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

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@

show more ...


# e71d1673 12-Nov-2018 krw <krw@openbsd.org>

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
cl

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@

show more ...


# 3d766aef 11-Nov-2018 dlg <dlg@openbsd.org>

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

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.

show more ...


# 6845379f 12-Sep-2018 krw <krw@openbsd.org>

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

ok claudio@


# c01b696d 30-May-2018 dlg <dlg@openbsd.org>

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 partic

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@

show more ...


# 85ff880a 25-Apr-2018 jca <jca@openbsd.org>

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@ deraad

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@

show more ...


# 3bf0166f 19-Feb-2018 dlg <dlg@openbsd.org>

tunneldf needs ifr_df


123456789