OpenVPN
|
Go to the source code of this file.
Functions | |
static bool | add_entry (struct client_nat_option_list *dest, const struct client_nat_entry *e) |
void | print_client_nat_list (const struct client_nat_option_list *list, int msglevel) |
struct client_nat_option_list * | new_client_nat_list (struct gc_arena *gc) |
struct client_nat_option_list * | clone_client_nat_option_list (const struct client_nat_option_list *src, struct gc_arena *gc) |
void | copy_client_nat_option_list (struct client_nat_option_list *dest, const struct client_nat_option_list *src) |
void | add_client_nat_to_option_list (struct client_nat_option_list *dest, const char *type, const char *network, const char *netmask, const char *foreign_network, int msglevel) |
static void | print_pkt (struct openvpn_iphdr *iph, const char *prefix, const int direction, const int msglevel) |
void | client_nat_transform (const struct client_nat_option_list *list, struct buffer *ipbuf, const int direction) |
void add_client_nat_to_option_list | ( | struct client_nat_option_list * | dest, |
const char * | type, | ||
const char * | network, | ||
const char * | netmask, | ||
const char * | foreign_network, | ||
int | msglevel | ||
) |
Definition at line 106 of file clinat.c.
References add_entry(), CN_DNAT, CN_SNAT, client_nat_entry::foreign_network, getaddr(), msg, client_nat_entry::netmask, client_nat_entry::network, and client_nat_entry::type.
Referenced by add_option().
|
static |
Definition at line 36 of file clinat.c.
References client_nat_option_list::entries, M_WARN, MAX_CLIENT_NAT, msg, and client_nat_option_list::n.
Referenced by add_client_nat_to_option_list(), and copy_client_nat_option_list().
void client_nat_transform | ( | const struct client_nat_option_list * | list, |
struct buffer * | ipbuf, | ||
const int | direction | ||
) |
Definition at line 193 of file clinat.c.
References ADD_CHECKSUM_32, ADJUST_CHECKSUM, BLEN, BPTR, openvpn_iphdr::check, openvpn_udphdr::check, openvpn_tcphdr::check, check_debug_level(), D_CLIENT_NAT, openvpn_iphdr::daddr, client_nat_option_list::entries, client_nat_entry::foreign_network, ip_tcp_udp_hdr::ip, client_nat_option_list::n, client_nat_entry::netmask, client_nat_entry::network, OPENVPN_IPPROTO_TCP, OPENVPN_IPPROTO_UDP, print_pkt(), openvpn_iphdr::protocol, openvpn_iphdr::saddr, SUB_CHECKSUM_32, ip_tcp_udp_hdr::tcp, client_nat_entry::type, ip_tcp_udp_hdr::u, and ip_tcp_udp_hdr::udp.
Referenced by process_ip_header().
struct client_nat_option_list* clone_client_nat_option_list | ( | const struct client_nat_option_list * | src, |
struct gc_arena * | gc | ||
) |
void copy_client_nat_option_list | ( | struct client_nat_option_list * | dest, |
const struct client_nat_option_list * | src | ||
) |
Definition at line 92 of file clinat.c.
References add_entry(), client_nat_option_list::entries, and client_nat_option_list::n.
Referenced by pre_connect_restore().
struct client_nat_option_list* new_client_nat_list | ( | struct gc_arena * | gc | ) |
Definition at line 75 of file clinat.c.
References ALLOC_OBJ_CLEAR_GC.
Referenced by cnol_check_alloc().
void print_client_nat_list | ( | const struct client_nat_option_list * | list, |
int | msglevel | ||
) |
Definition at line 52 of file clinat.c.
References client_nat_option_list::entries, client_nat_entry::foreign_network, gc_free(), gc_new(), IA_NET_ORDER, gc_arena::list, msg, client_nat_entry::netmask, client_nat_entry::network, print_in_addr_t(), and client_nat_entry::type.
Referenced by show_settings().
|
static |
Definition at line 169 of file clinat.c.
References CN_INCOMING, CN_OUTGOING, openvpn_iphdr::daddr, gc_free(), gc_new(), IA_NET_ORDER, msg, print_in_addr_t(), and openvpn_iphdr::saddr.
Referenced by client_nat_transform().