ISC DHCP  4.3.1
A reference DHCPv4 and DHCPv6 implementation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
dhcp.c File Reference
#include "dhcpd.h"
#include <errno.h>
#include <limits.h>
#include <sys/time.h>
#include "trace.h"

Go to the source code of this file.

Functions

char * print_client_identifier_from_packet (struct packet *packet)
 
char * print_hw_addr_or_client_id (struct packet *packet)
 
void dhcp (struct packet *packet)
 
void dhcpdiscover (struct packet *packet, int ms_nulltp)
 
void dhcprequest (struct packet *packet, int ms_nulltp, struct lease *ip_lease)
 
void dhcprelease (struct packet *packet, int ms_nulltp)
 
void dhcpdecline (struct packet *packet, int ms_nulltp)
 
void dhcpinform (struct packet *packet, int ms_nulltp)
 
void nak_lease (struct packet *packet, struct iaddr *cip)
 
void check_pool_threshold (struct packet *packet, struct lease *lease, struct lease_state *state)
 
void ack_lease (struct packet *packet, struct lease *lease, unsigned int offer, TIME when, char *msg, int ms_nulltp, struct host_decl *hp)
 
void delayed_ack_enqueue (struct lease *lease)
 
void flush_ackqueue (void *foo)
 
void dhcp_reply (struct lease *lease)
 
int find_lease (struct lease **lp, struct packet *packet, struct shared_network *share, int *ours, int *peer_has_leases, struct lease *ip_lease_in, const char *file, int line)
 
int mockup_lease (struct lease **lp, struct packet *packet, struct shared_network *share, struct host_decl *hp)
 
int allocate_lease (struct lease **lp, struct packet *packet, struct pool *pool, int *peer_has_leases)
 
int permitted (struct packet *packet, struct permit *permit_list)
 
int locate_network (struct packet *packet)
 
void get_server_source_address (struct in_addr *from, struct option_state *options, struct option_state *out_options, struct packet *packet)
 
void setup_server_source_address (struct in_addr *from, struct option_state *options, struct packet *packet)
 

Variables

int outstanding_pings
 
struct leasequeueackqueue_head
 
struct leasequeueackqueue_tail
 
int outstanding_acks
 
int max_outstanding_acks = DEFAULT_DELAYED_ACK
 
int max_ack_delay_secs = DEFAULT_ACK_DELAY_SECS
 
int max_ack_delay_usecs = DEFAULT_ACK_DELAY_USECS
 
int min_ack_delay_usecs = DEFAULT_MIN_ACK_DELAY_USECS
 
const int dhcp_type_name_max = ((sizeof dhcp_type_names) / sizeof (char *))
 

Function Documentation

void ack_lease ( struct packet packet,
struct lease lease,
unsigned int  offer,
TIME  when,
char *  msg,
int  ms_nulltp,
struct host_decl hp 
)

Definition at line 1884 of file dhcp.c.

int allocate_lease ( struct lease **  lp,
struct packet packet,
struct pool pool,
int peer_has_leases 
)

Definition at line 4553 of file dhcp.c.

void check_pool_threshold ( struct packet packet,
struct lease lease,
struct lease_state state 
)

Definition at line 1792 of file dhcp.c.

void delayed_ack_enqueue ( struct lease lease)

Definition at line 3382 of file dhcp.c.

void dhcp ( struct packet packet)

Definition at line 114 of file dhcp.c.

void dhcp_reply ( struct lease lease)

Definition at line 3504 of file dhcp.c.

void dhcpdecline ( struct packet packet,
int  ms_nulltp 
)

Definition at line 879 of file dhcp.c.

void dhcpdiscover ( struct packet packet,
int  ms_nulltp 
)

Definition at line 293 of file dhcp.c.

void dhcpinform ( struct packet packet,
int  ms_nulltp 
)

Definition at line 1006 of file dhcp.c.

void dhcprelease ( struct packet packet,
int  ms_nulltp 
)

Definition at line 743 of file dhcp.c.

void dhcprequest ( struct packet packet,
int  ms_nulltp,
struct lease ip_lease 
)

Definition at line 434 of file dhcp.c.

int find_lease ( struct lease **  lp,
struct packet packet,
struct shared_network share,
int ours,
int peer_has_leases,
struct lease ip_lease_in,
const char *  file,
int  line 
)

Definition at line 3749 of file dhcp.c.

void flush_ackqueue ( void *  foo)

Definition at line 3464 of file dhcp.c.

void get_server_source_address ( struct in_addr *  from,
struct option_state options,
struct option_state out_options,
struct packet packet 
)

Definition at line 4884 of file dhcp.c.

int locate_network ( struct packet packet)

Definition at line 4769 of file dhcp.c.

int mockup_lease ( struct lease **  lp,
struct packet packet,
struct shared_network share,
struct host_decl hp 
)

Definition at line 4503 of file dhcp.c.

void nak_lease ( struct packet packet,
struct iaddr cip 
)

Definition at line 1609 of file dhcp.c.

int permitted ( struct packet packet,
struct permit permit_list 
)

Definition at line 4710 of file dhcp.c.

char* print_client_identifier_from_packet ( struct packet packet)

Definition at line 77 of file dhcp.c.

char* print_hw_addr_or_client_id ( struct packet packet)

Definition at line 102 of file dhcp.c.

void setup_server_source_address ( struct in_addr *  from,
struct option_state options,
struct packet packet 
)

Definition at line 4962 of file dhcp.c.

Variable Documentation

struct leasequeue* ackqueue_head

Definition at line 40 of file dhcp.c.

struct leasequeue * ackqueue_tail

Definition at line 40 of file dhcp.c.

const int dhcp_type_name_max = ((sizeof dhcp_type_names) / sizeof (char *))

Definition at line 71 of file dhcp.c.

int max_ack_delay_secs = DEFAULT_ACK_DELAY_SECS

Definition at line 46 of file dhcp.c.

int max_ack_delay_usecs = DEFAULT_ACK_DELAY_USECS

Definition at line 47 of file dhcp.c.

int max_outstanding_acks = DEFAULT_DELAYED_ACK

Definition at line 45 of file dhcp.c.

int min_ack_delay_usecs = DEFAULT_MIN_ACK_DELAY_USECS

Definition at line 48 of file dhcp.c.

int outstanding_acks

Definition at line 44 of file dhcp.c.

int outstanding_pings

Definition at line 38 of file dhcp.c.