> Hello, all
> I am building a streams module for solaris 8 that sits between IP and
> ethernet header. By sending a NAK on the DL_IOC_HDR_INFO ioctl I have
> IP to disable the "fastpath" mechanism and use the standard DLPI
> mechanism of DL_UNITDATA_REQ for outgoing traffic.
From my experience with DLPI on Solaris (and others platforms), on Solaris
you can bind to a network adapter and there is no need to disable fastpath
to receive packets.
> This does not seem to work for incoming traffic. The first data from a
> source is received as a DL_UNITDATA_IND M_PROTO message (with chained
> M_DATA mesgs). After that, all data is received as M_DATA messages !?
You first need to attach to the proper interface (since Solaris is a
DLPI style 2 provider), then you need to DL_BIND_REQ preferably in
DL_CLDLS (connectionless) and probably also to dl_sap of ETHERTYPE_IP
(for others OS, for example HP-UX it's different).
After this usually every getmsg() will give you a M_PROTO and a M_DATA.
Quote:> Am I doing something wrong? I want to use the M_PROTO data to retrieve
> the source MAC address. Without this M_PROTO, there seems to be no
> safe way to establish this address (except peeking 14 bytes before the
To get your own MAC address, I'd recommend the DL_PHYS_ADDR_REQ with
dl_addr_type as DL_CURR_PHYS_ADDR. You will get the MAC in the ctlptr.
If you want to try to get your MAC from the network, you'd have trouble knowing
it if you're in promisc mode or if there is no one to send packets to you.
People are more *ly opposed to fur than to leather because it's
safer to harass rich women than motorcycle gangs.
http://www.veryComputer.com/;- ICQ UIN: 2295979