DTS Application Library
0.2.3
Application library containing referenced objects and interfaces to common libraries
|
Implementation of RFC6296. More...
Files | |
file | rfc6296.c |
Implementation of RFC6296. | |
Data Structures | |
struct | natmap |
RFC6296 Nat map. More... | |
Typedefs | |
typedef struct natmap | natmap |
Forward decleration of structure. More... | |
Functions | |
void | rfc6296_map (struct natmap *map, struct in6_addr *ipaddr, int out) |
Lookup and process a NAT transform as per RFC 6296. More... | |
int | rfc6296_map_add (char *intaddr, char *extaddr) |
Calculate and add a NAT map. More... | |
void | rfc6296_test (blist_cb callback, struct in6_addr *internal) |
Quick test function. More... | |
Implementation of RFC6296.
void rfc6296_map | ( | struct natmap * | map, |
struct in6_addr * | ipaddr, | ||
int | out | ||
) |
Lookup and process a NAT transform as per RFC 6296.
map | Nat map structure to procees against. |
ipaddr | Address to transform. |
out | Set to non zero if ipaddr is internal and must be transformed to external. |
Definition at line 62 of file rfc6296.c.
References natmap::adji, natmap::adjo, natmap::epre, natmap::ipre, and natmap::mask.
int rfc6296_map_add | ( | char * | intaddr, |
char * | extaddr | ||
) |
Calculate and add a NAT map.
intaddr | Internal prefix/subnet. |
extaddr | External prefix/subnet. |
Definition at line 111 of file rfc6296.c.
References addtobucket(), natmap::adji, natmap::adjo, checksum(), create_bucketlist(), natmap::epre, natmap::ipre, natmap::mask, objalloc(), and objunref().
void rfc6296_test | ( | blist_cb | callback, |
struct in6_addr * | internal | ||
) |
Quick test function.
Run a callback against each entry in the table with the internal address as data.
callback | Bucket list callback. |
internal | Ip addr passed as data to the callback. |
Definition at line 197 of file rfc6296.c.
References bucketlist_callback(), and objunref().