yet C99 inline semantics. plus wacky bugfix, inline signal handler, wtf ?
This commit is contained in:
parent
54d5dc9e82
commit
58dbc77d38
11
security/smurflog/patches/patch-hash_c
Normal file
11
security/smurflog/patches/patch-hash_c
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-hash_c,v 1.1 2017/04/19 22:20:27 espie Exp $
|
||||
--- hash.c.orig Thu Apr 20 00:18:07 2017
|
||||
+++ hash.c Thu Apr 20 00:18:20 2017
|
||||
@@ -31,6 +31,7 @@ void clear_hash(void)
|
||||
memset(hashtable, 0, sizeof(hashtable));
|
||||
}
|
||||
|
||||
+extern int unnamed(u_long);
|
||||
inline int unnamed(u_long ip)
|
||||
{
|
||||
u_char hashval;
|
34
security/smurflog/patches/patch-smurflog_c
Normal file
34
security/smurflog/patches/patch-smurflog_c
Normal file
@ -0,0 +1,34 @@
|
||||
$OpenBSD: patch-smurflog_c,v 1.1 2017/04/19 22:20:27 espie Exp $
|
||||
--- smurflog.c.orig Thu Apr 20 00:15:03 2017
|
||||
+++ smurflog.c Thu Apr 20 00:15:59 2017
|
||||
@@ -46,6 +46,7 @@ void usage(char *progname)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
+extern void log(char *format, ...);
|
||||
inline void log(char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
@@ -68,7 +69,7 @@ inline void log(char *format, ...)
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
-inline RETSIGTYPE alarm_handler(int status)
|
||||
+RETSIGTYPE alarm_handler(int status)
|
||||
{
|
||||
if (!smurfmode) {
|
||||
if (kbps >= THRESHOLD_KBPS && pps >= THRESHOLD_PPS) {
|
||||
@@ -163,11 +164,13 @@ inline void handlepkt(const u_char *packet)
|
||||
num, inet_ntoa(*((struct in_addr *) &srcip)), ntohs(length));
|
||||
}
|
||||
|
||||
+extern void eth_printer(u_char *, const struct pcap_pkthdr *, const u_char *);
|
||||
inline void eth_printer(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
|
||||
{
|
||||
handlepkt(p+14);
|
||||
}
|
||||
|
||||
+extern void ppp_printer(u_char *, const struct pcap_pkthdr *, const u_char *);
|
||||
inline void ppp_printer(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
|
||||
{
|
||||
handlepkt(p+4);
|
Loading…
Reference in New Issue
Block a user