Article 6T1EK FRAME sockets added to OpenBSD

FRAME sockets added to OpenBSD

by
from OpenBSD Journal on (#6T1EK)

Thanks toworkby David Gwynne (dlg@),OpenBSD -current now has a new"AF_FRAME"socket domain:

CVSROOT:/cvsModule name:srcChanges by:dlg@cvs.openbsd.org2024/12/15 04:00:05Modified files:sys/conf : files sys/kern : uipc_domain.c uipc_socket.c sys/net : if_ethersubr.c sys/sys : socket.h Added files:sys/net : af_frame.c frame.h Log message:add an AF_FRAME socket domain and an IFT_ETHER protocol family under it.this allows userland to use sockets to send and receive Ethernetframes. as per the upcoming frame.4 man page:frame protocol family sockets are designed as an alternative to bpf(4)for handling low data and packet rate communication protocols. Ratherthan filtering every frame entering the system before the network stacklike bpf(4), the frame protocol family processing avoids this overhead byrunning after the built in protocol handlers in the kernel. For thisreason, it is not possible to handle IPv4 or IPv6 packets with frameprotocol sockets because the kernel network stack consumes them beforethe receive handling for frame sockets is run.if you've used udp sockets then these should feel much the same.my main motivation is to implement an lldp agent in userland, butwithout having to have bpf look at every packet when lldp happensevery minute or two.the only feedback i had was positive, so i'm putting it inok claudio@

There's been a related change toaggr(4).

External Content
Source RSS or Atom Feed
Feed Location http://undeadly.org/cgi?action=rss
Feed Title OpenBSD Journal
Feed Link http://undeadly.org/
Reply 0 comments