Re: User-space controlled raw ethernet - Is this the way to go?
- From: Andy <ajg112@xxxxxxxxxxxxxx>
- Date: Mon, 25 Feb 2008 19:06:14 +0000
Jan Kandziora wrote:
> Essentially, libpcap does not neet root priviledge, but CAP_NET_RAW and
> maybe CAP_NET_ADMIN capabilities.
Yes, I remember looking into this when I was considering the libpcap route. But to be honest, I got totally lost, and could find little examples/further explanation that helped. My conclusion (that might be totally wrong) was that most of the capabilities stuff is deprecated (or haeding that way).
Chris Friesen wrote:
If you can get the root privileges to install a kernel module, can't you make the executable setuid root?
Perhaps If I added a bit more detail. That main application that will be sending/receiving data (on the PC side) will be Java based. My plan was to use a bit of JNI to link the Java to the low-level socket code (whether it's a kernel module or libpcap based). I don't want the Java app running as root. I'm not too sure how to have the ethernet access running with root permissions, but the Java app running as a regular user.
With regards to the kernel module. Things _were_ going well. But with further reading, it seems creating and using a socket from within a kernel module isn't good practice, or even allowed. (Again, I may be totally wrong here). When I try to compile a module using the socket function I get:
warning: implicit declaration of function 'socket'
I'm certain I have the right headers included. The same set worked when used with a non-kernel module test program.
Andy
.
- Follow-Ups:
- Re: User-space controlled raw ethernet - Is this the way to go?
- From: Rainer Weikusat
- Re: User-space controlled raw ethernet - Is this the way to go?
- References:
- User-space controlled raw ethernet - Is this the way to go?
- From: Andrew Greensted
- Re: User-space controlled raw ethernet - Is this the way to go?
- From: Chris Friesen
- User-space controlled raw ethernet - Is this the way to go?
- Prev by Date: Re: Swap or I/O Improvement in Fedora 8?
- Next by Date: Re: User-space controlled raw ethernet - Is this the way to go?
- Previous by thread: Re: User-space controlled raw ethernet - Is this the way to go?
- Next by thread: Re: User-space controlled raw ethernet - Is this the way to go?
- Index(es):
Relevant Pages
|