relay/dhcrelay.c File Reference

#include "dhcpd.h"
#include <syslog.h>
#include <signal.h>
#include <sys/time.h>
#include <cap-ng.h>

Go to the source code of this file.

Data Structures

struct  server_list
struct  stream_list

Defines

#define DHCRELAY_USAGE

Enumerations

enum  { forward_and_append, forward_and_replace, forward_untouched, discard }

Functions

int main (int argc, char **argv)
void dhcpv6 (struct packet *packet)
void bootp (struct packet *packet)
void dhcp (struct packet *packet)
void classify (struct packet *p, struct class *c)
int check_collection (struct packet *p, struct lease *l, struct collection *c)
isc_result_t find_class (struct class **class, const char *c1, const char *c2, int i)
int parse_allow_deny (struct option_cache **oc, struct parse *p, int i)
isc_result_t dhcp_set_control_state (control_object_state_t oldstate, control_object_state_t newstate)

Variables

int keep_capabilities = 0
TIME default_lease_time = 43200
TIME max_lease_time = 86400
struct tree_cache * global_options [256]
struct optionrequested_opts [2]
int lexline
int lexchar
char * token_line
char * tlname
const char * path_dhcrelay_pid = _PATH_DHCRELAY_PID
isc_boolean_t no_dhcrelay_pid = ISC_FALSE
isc_boolean_t no_pid_file = ISC_FALSE
int bogus_agent_drops = 0
int bogus_giaddr_drops = 0
int client_packets_relayed = 0
int server_packet_errors = 0
int server_packets_relayed = 0
int client_packet_errors = 0
int add_agent_options = 0
int agent_option_errors = 0
int drop_agent_mismatches = 0
int corrupt_agent_options = 0
int missing_agent_option = 0
int bad_circuit_id = 0
int missing_circuit_id = 0
int max_hop_count = 10
isc_boolean_t use_if_id = ISC_FALSE
int dhcp_max_agent_option_packet_length = DHCP_MTU_MIN
enum { ... }  agent_relay_mode
u_int16_t local_port
u_int16_t remote_port
struct server_listservers
struct stream_listdownstreams
struct stream_listupstreams
char * dhcrelay_sub_id = NULL

Define Documentation

#define DHCRELAY_USAGE
Value:
"Usage: dhcrelay [-4] [-d] [-q] [-a] [-D]\n"\
"                     [-A <length>] [-c <hops>] [-p <port>]\n" \
"                     [-pf <pid-file>] [--no-pid]\n"\
"                     [-m append|replace|forward|discard]\n" \
"                     [-i interface0 [ ... -i interfaceN]\n" \
"                     server0 [ ... serverN]\n\n" \
"       dhcrelay -6   [-d] [-q] [-I] [-c <hops>] [-p <port>]\n" \
"                     [-pf <pid-file>] [--no-pid]\n" \
"                     [-s <subscriber-id>]\n" \
"                     -l lower0 [ ... -l lowerN]\n" \
"                     -u upper0 [ ... -u upperN]\n" \
"       lower (client link): [address%%]interface[#index]\n" \
"       upper (server link): [address%%]interface"

Definition at line 149 of file dhcrelay.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
forward_and_append 
forward_and_replace 
forward_untouched 
discard 

Definition at line 93 of file dhcrelay.c.


Function Documentation

void bootp ( struct packet packet  ) 

Definition at line 1715 of file dhcrelay.c.

int check_collection ( struct packet p,
struct lease l,
struct collection c 
)

Definition at line 1730 of file dhcrelay.c.

void classify ( struct packet p,
struct class c 
)

Definition at line 1725 of file dhcrelay.c.

void dhcp ( struct packet packet  ) 

Definition at line 1720 of file dhcrelay.c.

isc_result_t dhcp_set_control_state ( control_object_state_t  oldstate,
control_object_state_t  newstate 
)

Definition at line 1745 of file dhcrelay.c.

void dhcpv6 ( struct packet packet  ) 

Definition at line 1687 of file dhcrelay.c.

isc_result_t find_class ( struct class **  class,
const char *  c1,
const char *  c2,
int  i 
)

Definition at line 1735 of file dhcrelay.c.

int main ( int  argc,
char **  argv 
)

Definition at line 177 of file dhcrelay.c.

int parse_allow_deny ( struct option_cache **  oc,
struct parse p,
int  i 
)

Definition at line 1740 of file dhcrelay.c.


Variable Documentation

Definition at line 67 of file dhcrelay.c.

Definition at line 69 of file dhcrelay.c.

enum { ... } agent_relay_mode

Definition at line 77 of file dhcrelay.c.

Definition at line 56 of file dhcrelay.c.

Definition at line 60 of file dhcrelay.c.

Definition at line 65 of file dhcrelay.c.

Definition at line 62 of file dhcrelay.c.

Definition at line 73 of file dhcrelay.c.

Definition at line 39 of file dhcrelay.c.

Definition at line 89 of file dhcrelay.c.

char* dhcrelay_sub_id = NULL

Definition at line 125 of file dhcrelay.c.

Definition at line 71 of file dhcrelay.c.

struct tree_cache* global_options[256]

Definition at line 41 of file dhcrelay.c.

Definition at line 36 of file dhcrelay.c.

Definition at line 47 of file dhcrelay.c.

Definition at line 46 of file dhcrelay.c.

u_int16_t local_port

Definition at line 98 of file dhcrelay.c.

Definition at line 81 of file dhcrelay.c.

Definition at line 40 of file dhcrelay.c.

Definition at line 75 of file dhcrelay.c.

Definition at line 79 of file dhcrelay.c.

isc_boolean_t no_dhcrelay_pid = ISC_FALSE

Definition at line 52 of file dhcrelay.c.

isc_boolean_t no_pid_file = ISC_FALSE

Definition at line 54 of file dhcrelay.c.

const char* path_dhcrelay_pid = _PATH_DHCRELAY_PID

Definition at line 51 of file dhcrelay.c.

u_int16_t remote_port

Definition at line 99 of file dhcrelay.c.

struct option* requested_opts[2]

Definition at line 43 of file dhcrelay.c.

Definition at line 63 of file dhcrelay.c.

Definition at line 64 of file dhcrelay.c.

struct server_list * servers
char* tlname

Definition at line 49 of file dhcrelay.c.

char* token_line

Definition at line 48 of file dhcrelay.c.

isc_boolean_t use_if_id = ISC_FALSE

Definition at line 85 of file dhcrelay.c.


Generated on 5 Apr 2014 for ISC DHCP by  doxygen 1.6.1