Logo Search packages:      
Sourcecode: rainbow version File versions  Download package

test_nat.c

#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;
}

Generated by  Doxygen 1.6.0   Back to index