Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th January 2010
sean sean is offline
New User
Join Date: Jan 2010
Posts: 2
Default Device-agnostic network interface

I'm trying to learn more about OpenBSD, but I'm coming from a Linux kernel background and having a bit of trouble. Specifically, I'm trying to familiarize myself with the networking code. I haven't been able to find many good resources that deal specifically with the kernel code, so if you have any recommendations - I'm all ears. And if I'm completely missing the point about some differences between Linux and BSD, please tell me!

In Linux terms, I'm trying to find the equivalent of net_rx and dev_queue_xmit, if such a thing exists. They're functions that basically send raw packets to the device, and receive raw packets from the device. With the exception of NAPI-drivers - pretty much everything goes through these functions regardless of device or protocol. I like to think of these functions and the sockets-related system calls as the beginning and and of the network stack - and since it's an easy way for me to think about it - I was hoping BSD would be the same.

I've been searching through the OpenBSD code, and I found ether_input and ether_output in sys/net/if_ethersubr.c, and this function (or variations of it) is called by usb drivers and all other sorts. So my question is, are these the functions I'm looking for? They sound ethernet specific - are there any other link-layer protocols that get handled? And if so, how are these functions linked to the device level?

Thanks for any help or references you may be able to provide!
Reply With Quote
  #2   (View Single Post)  
Old 27th January 2010
J65nko J65nko is offline
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,593

AFAIK there are not really any OpenBSD network stack hackers here.
I think you have a greater chance of getting an answer, by asking on the openbsd misc mailing list.
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 28th January 2010
sean sean is offline
New User
Join Date: Jan 2010
Posts: 2

Thanks - I put it on the mailing list this morning and just got a link to an excellent set of slides. For the sake of future searchers I'll post it here:

www dot openbsd dot org slash papers slash asiabsdcon08-network

(forgive the cryptic url - I don't yet have the requisite 5 posts)
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web interface for rTorrent Beastie FreeBSD Ports and Packages 0 24th August 2009 11:53 AM
CARP interface with DHClient xinform3n OpenBSD General 5 22nd July 2009 12:41 PM
NAT with only one interface zapov General software and network 4 16th February 2009 03:45 AM
identifying device associated with USB device? spiderpig OpenBSD General 2 7th July 2008 05:18 AM
Web interface for pf? windependence OpenBSD Security 4 20th May 2008 03:58 AM

All times are GMT. The time now is 10:32 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick