Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

XgDhcp


Data Structures

struct  bootp
 DHCP telegram structure. More...


Functions

u_short DhcpFrameInit (void)
 Initialize the global send frame for DHCP requests.

u_char DhcpGetOption (u_char opt, void *ptr, u_char size)
 Retrive the specified DCHP option.

int DhcpQuery (void)
 Query any DHCP server on the local net.


Function Documentation

u_short DhcpFrameInit void   
 

Initialize the global send frame for DHCP requests.

Returns:
Size of the frame.

u_char DhcpGetOption u_char    opt,
void *    ptr,
u_char    size
 

Retrive the specified DCHP option.

Parameters:
opt  Option to look for.
ptr  Pointer to the buffer that receives the option value.
size  Size of the buffer.
Returns:
Size of the retrieved option value or zero, if the specified option couldn't be found.

int DhcpQuery void   
 

Query any DHCP server on the local net.

On success, this routine will fill some global variables:

  • local_ip
  • server_ip
  • bootfile
  • netmask
  • broadcast
  • gateway
  • dns
  • sid
Returns:
0 on success, -1 otherwise.


Generated on Thu Jan 30 22:30:58 2003 for EduNet by doxygen1.2.18