History log of /haiku/src/libs/compat/freebsd_network/compat/net/if.h
Revision Date Author Comments
# 44fa45df 13-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

net/if: Drop ifmediareq and just use the regular ifreq for SIOCGIFMEDIA.

This was introduced into the main API in 2010 (d72ede75fb252c24c8a5fcc39395f9ae1c202322),
but was actually only fully used for the past month (c2a9a890f3ac7795602d11c0edaa20ac2db48202)
when SIOCGIFMEDIA was supported for all *BSD drivers and not just WiFi.
Most userland consumers of this structure did not use it correctly,
as was the case in #17770, and only worked because in the fallback case
the network stack just treated it as if it were an ifreq.

Nothing actually used the ifm_count/ifm_ulist (though tentative APIs
were exposed for it) as noted by previous commits; and the fact that
Haiku's IFM_* declarations are so spartan makes most of the returned
values unintelligible to userland without using FreeBSD compat headers.

If, in the future, we decide to implement ifmedia listing and selection
properly, that should likely be done with separate ioctls instead of
having multi-function ones like this.

This is technically an ABI break, but in practice it should not matter:
ifmediareq::ifm_current aligns with ifreq::ifr_media, so the things
that used this structure like our in-tree code did will continue to work.
Until this past May, the only other field that was usually set was
ifm_active, but in the absence of setting ifm_status all non-Haiku
consumers should ignore it completely.

The only consumer of this ioctl that I know of out of the tree,
wpa_supplicant, still works after these changes.


# 8548a4ad 12-May-2022 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Adaptations in preparation for the OpenBSD layer.

Most of these changes however add things that FreeBSD has (with a few
exceptions noted in comments) which the OpenBSD shim layer merely needs
to make use of.

(FreeBSD used to have support for IFF_NEEDSGIANT but removed it. The
support instated here is very similar to what FreeBSD used to have.)


# 034d5006 20-Oct-2021 Augustin Cavalier <waddlesplash@gmail.com>

freebsd compat: Updates and additions for a newer iflib.


# f733714a 07-Jan-2019 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Changes for FreeBSD 12 net80211.


# 8267c193 29-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Lots of additions and modifications for iflib.


# dba28784 24-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

freebsd11_network -> freebsd_network.

FreeBSD 12 has no major changes to the ifnet KPIs that constitute a
source compatibility break, save a single one related to locking
which doesn't really apply to us, and so we don't need to create
a "freebsd12_network" directory to work through the upgrades.


# a7359754 18-Jan-2017 Andrew Aldridge <i80and@foxquill.com>

Sync atheros813x with FreeBSD

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12328.
Fixed a style error (2 lines between functions).


# d72ede75 10-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* We now use a FreeBSD compatible ifmediareq structure for SIOCIFMEDIA, and
SIOCSIFMEDIA.
* Made sure that the two media ioctls are actually forwarded to the driver.
* Added NetworkDevice.cpp to the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39389 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9d771afb 29-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Added Haiku specific socket ioctls to configure the interface aliases:
SIOC_IF_ALIAS_ADD, SIOC_IF_ALIAS_REMOVE, SIOC_IF_ALIAS_GET, SIOC_ALIAS_SET,
and SIOC_IF_ALIAS_COUNT.
* Implemented all of those new ioctls, though they are yet untested.
* Added ifreq::ifr_data, and removed the hack in the FreeBSD compat if.h
header.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37806 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 642e8bd7 28-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Should have been part of the last commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37795 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af90dcab 06-Jun-2010 Jérôme Duval <korli@users.berlios.de>

added pci_set_max_read_req, pci_get_max_read_req and definitions required by if_re.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37040 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14627e08 22-Oct-2009 Colin Günther <coling@gmx.de>

* reordering of headerfile inclusion to comply to FreeBSD 8
ordering.
this makes porting driver (especially wifi ones) more
convinient
* based on FreeBSD svn revision 196691

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33739 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44ec2ebd 18-Feb-2009 Karsten Heimrich <host.haiku@gmx.de>

* update freebsd compat with stubbed eventhandler
* get e1000 to compile
* remove dev/em from the build (might be removed later on)
* tested on VirtualBox (gcc2,gcc4), VMware(gcc4) and natively on
ThinkPad T500 (gcc4)

* courtesy of Michael Weirauch (emwe)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29247 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 239239c8 25-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Updated the FreeBSD compatibility layer for network drivers to FreeBSD 7
(RELENG_7_BP).
* There are many white spots, though, most notable PCI MSI(-X) support, and
jumbo frames.
* Fixed removing interrupts for the INTR_FAST case. Since FreeBSD 7 added
a new interrupt "filter" mechanism, we can finally report if the interface
was handled by a device or not (though only very few devices support this
yet).
* Updated the 3com, rtl8139, e1000, and via_rhine drivers to the latest code
base. They all compile, but I haven't tested them after the changes yet!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22991 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1a99f77 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: use a thread for deferred interrupt handling. fixed a issue with bus_space_write_N. init the receive queue on device creation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21041 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 00212abe 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: a few more methods, preparing for pcnet


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21026 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82256564 02-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added mbuf allocation and if_media support


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20990 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 750ddafd 02-May-2007 Hugo Santos <hugosantos@nowhere.fake>

initial work towards a FreeBSD network driver source level compatibility layer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20985 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d72ede75fb252c24c8a5fcc39395f9ae1c202322 10-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* We now use a FreeBSD compatible ifmediareq structure for SIOCIFMEDIA, and
SIOCSIFMEDIA.
* Made sure that the two media ioctls are actually forwarded to the driver.
* Added NetworkDevice.cpp to the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39389 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9d771afb3903b3d3d205cfa108eaebb14d89f7fb 29-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Added Haiku specific socket ioctls to configure the interface aliases:
SIOC_IF_ALIAS_ADD, SIOC_IF_ALIAS_REMOVE, SIOC_IF_ALIAS_GET, SIOC_ALIAS_SET,
and SIOC_IF_ALIAS_COUNT.
* Implemented all of those new ioctls, though they are yet untested.
* Added ifreq::ifr_data, and removed the hack in the FreeBSD compat if.h
header.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37806 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 642e8bd72a7ee0fe8d40bb9e275bb5e473b91a28 28-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Should have been part of the last commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37795 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af90dcab6f8283a7e2835212d187a9a58fbdad38 06-Jun-2010 Jérôme Duval <korli@users.berlios.de>

added pci_set_max_read_req, pci_get_max_read_req and definitions required by if_re.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37040 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14627e087b920676d05d45cec5f28688744e1fdb 22-Oct-2009 Colin Günther <coling@gmx.de>

* reordering of headerfile inclusion to comply to FreeBSD 8
ordering.
this makes porting driver (especially wifi ones) more
convinient
* based on FreeBSD svn revision 196691

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33739 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44ec2ebd200f18741d00fb8a76ddfb85485541cd 18-Feb-2009 Karsten Heimrich <host.haiku@gmx.de>

* update freebsd compat with stubbed eventhandler
* get e1000 to compile
* remove dev/em from the build (might be removed later on)
* tested on VirtualBox (gcc2,gcc4), VMware(gcc4) and natively on
ThinkPad T500 (gcc4)

* courtesy of Michael Weirauch (emwe)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29247 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 239239c8a0c6a2671f8f236ba32abf03e78f0c27 25-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Updated the FreeBSD compatibility layer for network drivers to FreeBSD 7
(RELENG_7_BP).
* There are many white spots, though, most notable PCI MSI(-X) support, and
jumbo frames.
* Fixed removing interrupts for the INTR_FAST case. Since FreeBSD 7 added
a new interrupt "filter" mechanism, we can finally report if the interface
was handled by a device or not (though only very few devices support this
yet).
* Updated the 3com, rtl8139, e1000, and via_rhine drivers to the latest code
base. They all compile, but I haven't tested them after the changes yet!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22991 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1a99f77d48faf3bd1d0e007afebb96c34016893 06-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: use a thread for deferred interrupt handling. fixed a issue with bus_space_write_N. init the receive queue on device creation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21041 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 00212abe1c16a1cd1fdef6f0fddb2a67e48af934 04-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: a few more methods, preparing for pcnet


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21026 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82256564e26214c7041963436ea6ede7fdc9706e 02-May-2007 Hugo Santos <hugosantos@nowhere.fake>

freebsd compat. layer: added mbuf allocation and if_media support


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20990 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 750ddafd50d75eff1baf4e34ed5f037863fb9cdc 02-May-2007 Hugo Santos <hugosantos@nowhere.fake>

initial work towards a FreeBSD network driver source level compatibility layer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20985 a95241bf-73f2-0310-859d-f6bbb57e9c96