test_nfct_get.c: openlog()

This commit is contained in:
Thomas Bernard 2019-06-30 21:50:55 +02:00
parent 9070e175d4
commit d8368f7651
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
1 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,6 @@
/* $Id: test_nfct_get.c,v 1.2 2019/06/30 19:49:18 nanard Exp $ */
#include <stdio.h>
#include <syslog.h>
#include "nfct_get.c"
int main(int argc, char *argv[])
@ -5,8 +8,12 @@ int main(int argc, char *argv[])
struct sockaddr_storage src, dst, ext;
char buff[INET6_ADDRSTRLEN];
if (argc!=5)
return 0;
if (argc!=5) {
fprintf(stderr, "Usage: %s SRC_IP SRC_PORT DST_IP DST_PORT\n", argv[0]);
return 1;
}
openlog("test_nfct_get", LOG_PERROR|LOG_CONS, LOG_LOCAL0);
if (1 != inet_pton(AF_INET, argv[1],
&((struct sockaddr_in*)&src)->sin_addr)) {