Connecting Tech Pros Worldwide Forums | Help | Site Map

DHCP and RAW socket and C

yannifan
Guest
 
Posts: n/a
#1: Apr 22 '07
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


Walter Roberson
Guest
 
Posts: n/a
#2: Apr 22 '07

re: DHCP and RAW socket and C


In article <1177275784.943831.266500@e65g2000hsc.googlegroups .com>,
yannifan <sudhi.nr@gmail.comwrote:
Quote:
>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.
Quote:
>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."
--
There are some ideas so wrong that only a very intelligent person
could believe in them. -- George Orwell
Closed Thread