| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 3/13/02 3:57 PM, "Justin C. Walker" <email@hidden> wrote:
On Wednesday, March 13, 2002, at 03:27 PM, Nick Howes wrote:
This is a bit of a long shot, but here goes: I want to prototype some
code for an embedded java project on Mac OS X - I can use J2SE for the
prototype, so that's not a problem. However, I need to be able to send
and receive ethernet packets, not TCP/IP packets, ethernet packets with
a particular protocol number. A while ago, I did a project using JNI
on Linux, but I'm guessing this puts me into the driver code, maybe
even the kernel - places where I'm not too comfortable! I'm hoping
that someone might point me to some example code or have done a similar
project and be willing to share their code.
There are a couple of alternatives, none that should force you into the
kernel. Probably the easiest is to use BPF (q.v.). You can check the
bootp project to find code that reads and writes from one of the bpf
devices. In addition, you can get on the bleeding edge and use a
PF_NDRV socket. Check the SharedIP module for details on how to use
this one.
I would recommend PF_NDRV, it isn't the bleeding edge it used to be.
Internally we've used it for something that hasn't been released yet and
ironed out the problems.
If you need some sample code, let me know, I think I can dig some up
somewhere.
| References: | |
| >Re: Ethernet code (From: Josh Graessley <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.