Merge branch 'master' of https://github.com/farrokhi/fsipd
This commit is contained in:
commit
23785e3df1
6
Makefile
6
Makefile
@ -1,7 +1,7 @@
|
||||
PREFIX=/usr/local
|
||||
PREFIX?=/usr/local
|
||||
INC=-I$(PREFIX)/include
|
||||
LIB=-L$(PREFIX)/lib -L. -lpidfile
|
||||
CFLAGS=-Wall -g -O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing
|
||||
CFLAGS=-Wall -Wextra -g -O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing
|
||||
CC?=cc
|
||||
AR?=AR
|
||||
RANLIB?=ranlib
|
||||
@ -20,5 +20,5 @@ fsipd: fsipd.c $(LIBPIDFILE)
|
||||
$(CC) $(CFLAGS) $(INC) $(LIB) fsipd.c -o fsipd
|
||||
|
||||
clean:
|
||||
rm -f *.o a.out core temp.* $(LIBPIDFILE) $(PROGS)
|
||||
rm -f *.o *.a a.out core temp.* $(LIBPIDFILE) $(PROGS)
|
||||
rm -fr *.dSYM
|
11
fsipd.c
11
fsipd.c
@ -32,6 +32,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
@ -89,12 +90,8 @@ process_request(char *str)
|
||||
{
|
||||
/* check input str for SIP requests */
|
||||
|
||||
/*
|
||||
* TODO: log connection info including SRC/DST IP, SRC/DST PORT,
|
||||
* Timestamp and Message Type in CSV Format
|
||||
*/
|
||||
|
||||
syslog(LOG_ALERT, "incoming packet: %s\n", str);
|
||||
syslog(LOG_ALERT, "sip: %s, sport: %d, payload: \"%s\"\n",
|
||||
inet_ntoa(sa.sin_addr), ntohs(sa.sin_port), str);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -208,7 +205,7 @@ daemon_start()
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
main(void)
|
||||
{
|
||||
return (daemon_start());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user