home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp
- Path: sparky!uunet!mcsun!sunic!aun.uninett.no!Steinar.Haug
- From: Steinar.Haug@delab.sintef.no (Steinar Haug)
- Subject: How can I send Ethernet packets from a user process?
- Message-ID: <STEINAR.HAUG.93Jan5213613@delab.sintef.no>
- Sender: news@aun.uninett.no
- Nntp-Posting-Host: tosca.er.sintef.no
- Organization: SINTEF DELAB, Trondheim, Norway.
- Date: Tue, 5 Jan 1993 20:36:13 GMT
- Lines: 38
-
- I posted this one right before Christmas, and didn't get a single response
- (except for one "me too, please"). Maybe I'll have better luck now that we
- are all back at work again :-)
-
- Steinar
- ----------------------------------------------------------------------
- I'm trying to send Ethernet packets from a user level process, using the
- interface defined in lan(7). The system is a 433s, running 8.0. I have tried
- the examples in /usr/netdemo/LLA, and these work just fine. But as soon as I
- try to send Ethernet packets instead of 802.3 packets, I get an EINVAL. What
- I'm doing:
-
- - The machine has 2 ethernet interfaces. lanscan shows that lan0 is
- configured for Ether and 802.3, lan1 is configured for Ether only.
-
- - I'm trying to use the example from /usr/netdemo/LLA/nput.c, and
- substituting LOG_TYPE_FIELD instead of LOG_DSAP in the ioctl. The
- ioctl call returns EINVAL.
-
- - The Ether type field that I'm using is legal according to the
- lan(7) man page, it is *not* one of the reserved ones. I have tried
- several different Ether types, but always get the same error.
-
- - lan(7) specifies that EINVAL will be returned for several reasons,
- one of them being that a LOG_TYPE_FIELD was sent to an 802.3 device.
- I'm speculating that this may be what the system is trying to tell
- me, but I don't really know...
-
- I have assumed that one simply needs to use LOG_TYPE_FIELD, and specify an
- interface that has Ether encapsulation enabled, in order to send Ethernet
- packets as opposed to 802.3 packets. Is there something else that needs to
- be done also? Does somebody have a working example of how to send Ethernet
- packets?
-
- Steinar Haug, system/networks administrator
- SINTEF DELAB, University of Trondheim, NORWAY
- Email: Steinar.Haug@delab.sintef.no,
- sthaug@idt.unit.no, steinar@tosca.er.sintef.no
-