DHCP and RAW socket and C

Y

yannifan

Hi
This is my first post and am a newbie to network programming.
My currrent assignment is concerned with DHCP client server
programming and need some help with that.

I need to request two IP addresses on the client side from the server.
I have a single LAN card and the request is sent from client on the
same LAN card. The first request contains the preffered IP address and
the MAc address and is sent using sendto() function inside another
function send_packet(). The second request contains a preffered IP
address and a third parth MAC address(not the same address on which
the client is working). In sendto() function i get a message "such a
device does not exist". Not surprised by that, but i need to get this
working. Ne ideas from ne one.
I heard i can use RAW sockets instead of Datagram. Will this put the
card in promiscous mode? Is this a solution?

http://www.isc.org/index.pl?/sw/dhcp/

This is the code im using at the client and server side to run the
daemons.

Pls help

Thanks in advance
 
W

Walter Roberson

This is my first post and am a newbie to network programming.
My currrent assignment is concerned with DHCP client server
programming and need some help with that.

Sorry, network programming is not part of the standard C language,
and is not considered topical here. You will need to consult a
newsgroup that deals with the operating system you are using, as
different operating systems handle network programming in different ways.
I heard i can use RAW sockets instead of Datagram. Will this put the
card in promiscous mode? Is this a solution?

[OT]
RAW sockets do -not- put cards into promiscous mode in any OS I am
aware of, but programming with RAW sockets is decidedly less standardized
than programming for TCP or UDP. I know of at least four different
methods of handling RAW sockets just in "Unix" OS's alone. If
you aren't using RAW sockets then the tcp/ip newsgroup might be able
to help you, if you are using an OS that supports POSIX compliant
sockets, but when you get into RAW sockets, POSIX just basically says,
"They exist, and they are system specific."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top