Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rainbow/nss/test_nat.c
blob: b7a01cbf4d00afca0c2c5af8344622052d342ee2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
}