help regarding : To recieve and tranmit packet th' an interface

Bakul Shah bakul at BitBlocks.com
Tue Oct 18 10:01:07 PDT 2005


> we are writing a driver for HDLC-Controller We have coded upto some extent
> and actully we are able to transmit and recieve a char buff in loopback
> (from inside a driver).
>
> But we want to tranmit/Rx a real packet in (mbuf structure) and test our
> code .As it is a HDLC controller does'nt have std MAC ADDRRSS . How can i
> actually achieve a packet transmition and reception .Are there some drivers
> which does the same

Look at /sys/net/if_spppsubr.c or /sys/netgraph/ng_sppp.c.
One other option is to let your driver present a simple
serial IO interface and implement higher level logic in a
user level daemon that uses a tun device to plug into the
network layer (like /usr/sbin/ppp).  Also be, sure to read
RFC1661!


More information about the freebsd-hackers mailing list