Watt-32 tcp/ip  2.2 dev-rel.10
Data Structures | Functions | Variables
pcsarp.c File Reference

Go to the source code of this file.

Data Structures

struct  host_list
 

Functions

static void (W32_CALL *prev_cfg_hook)(const char *
 
static const char *static void
W32_CALL 
sarp_parse (const char *name, const char *value)
 Parser for "SEC_ARP.xx" keywords in WATTCP.CFG (or SARP.CFG).
 
static int sarp_receive (const struct sarp_Packet *sarp)
 
static int sarp_transmit (struct sarp_Packet *sarp)
 
int sarp_init (void)
 Application must call this before sock_init() so we don't link in OpenSSL libs by default.
 
static int read_ca_keyfile (const char *value)
 
static int read_priv_keyfile (const char *value)
 
static BOOL crypto_load_sarp_file (const char *pem_file, DSA **dsa)
 
static int set_secure_host (const char *value)
 
static int set_known_host (const char *value, int value_len)
 
static __inline BOOL is_secure_host (DWORD ip)
 Check if host should use secure ARP.
 
static __inline BOOL is_known_host (DWORD ip)
 Check if host is among the known hosts.
 
static int make_auth_Header (struct sarp_Packet *sarp)
 
void _sarp_debug_dump (void)
 Secure-ARP debug dump.
 

Variables

static char * ca_keyfile = NULL
 
static char * priv_keyfile = NULL
 
static int sarp_debug = 0
 
static struct host_listknown_hosts = NULL
 
static struct host_listsecure_hosts = NULL
 

Detailed Description

Secure ARP client.

March 2004-09: created. Partly based on Linux version by Albero Ornaghi alor@.nosp@m.blac.nosp@m.khats.nosp@m..it http://alor.antifork.org/projects/s-arp/ http://www.acsac.org/2003/papers/111.pdf

This is mostly an excersise in OpenSSL programming. Don't expect it to make sense since S-ARP is completely non-standard (no RFC). Only Linux has a kernel patch to use S-ARP.

Definition in file pcsarp.c.

Function Documentation

static int sarp_receive ( const struct sarp_Packet sarp)
static
Todo:

Definition at line 253 of file pcsarp.c.

References is_known_host(), and is_secure_host().