diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2010-07-21 17:30:43 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2010-07-21 17:30:43 (GMT) |
commit | 5ab8ddb8ddb8dc6925cb3bb5f52e0a06b7a1c439 (patch) | |
tree | 01e6ca6d9d6eaa54052480200f039c8e50f0166f /nss/test_nat.c | |
parent | d4fe57f377d8f78f02a9e5f6d9c201b4e9eb86f4 (diff) |
rearrange source tree to match that of the tarball
Diffstat (limited to 'nss/test_nat.c')
-rw-r--r-- | nss/test_nat.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/nss/test_nat.c b/nss/test_nat.c new file mode 100644 index 0000000..b7a01cb --- /dev/null +++ b/nss/test_nat.c @@ -0,0 +1,24 @@ +#define _GNU_SOURCE +#include <errno.h> +#include <stdio.h> +#include <syslog.h> +#include <string.h> +#include <stdlib.h> + +#include "cgen.h" +#include "nat.h" + +#include "config/debug.h" + +int main() +{ + openlog("nat", LOG_PERROR, LOG_LOCAL0); + unsigned long data; + char buf[] = "12345"; + CHK(parse_nat(&data, buf, strlen(buf)) == 1, "Death", out_death); + printf("%ld\n", data); + return 0; +out_death: + printf("Death."); + return -1; +} |