Re: Raw sockets and bootp
- From: Tauno Voipio <tauno.voipio@xxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 16 Feb 2006 19:57:40 GMT
Roger wrote:
For the low ports (UDP/67 and UDP/68) you'll need superuser privileges.
I am running the part of the app that has the bootp via sudo
Is your problem to listen for the request or to return
the response to the client?
So far listning. Doing a normal UDP bind to the the port I can bind to
67 and show up in netstat, but while etherreal shows the incoming
packets arriving, select and recv get nothing. A web search on the
problem shows me I need raw sockets for both send and receive.
That takes more code than the rest of the bootp server put together.
I found code for a basic bootp server, but non of them use raw sockets
and presumably only work on other systems or with pre 2.2 kernels.
Oh well, if I do end up having to write my own then I suppose I could
(should!) write it up for others!
Did you remember that receiving from a non-connected socket
needs recvfrom()?
--
Tauno Voipio
tauno voipio (at) iki fi
.
- Follow-Ups:
- Re: Raw sockets and bootp
- From: Roger
- Re: Raw sockets and bootp
- From: Roger
- Re: Raw sockets and bootp
- References:
- Raw sockets and bootp
- From: Roger
- Re: Raw sockets and bootp
- From: Tauno Voipio
- Re: Raw sockets and bootp
- From: Roger
- Raw sockets and bootp
- Prev by Date: Re: Raw sockets and bootp
- Next by Date: Re: Raw sockets and bootp
- Previous by thread: Re: Raw sockets and bootp
- Next by thread: Re: Raw sockets and bootp
- Index(es):
Relevant Pages
|