diff options
author | laforge <laforge> | 2002-08-28 09:41:17 +0000 |
---|---|---|
committer | Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> | 2008-05-22 03:56:48 +0900 |
commit | a28559d6a9e213ccd9220b4ca24c1ef960defd94 (patch) | |
tree | bd60344635a1125c3622a6fe9053e4a080c47838 /extensions | |
parent | 73e65c8bf1df2a20763bf83cacc5d82dc9cab7c6 (diff) |
add support for string- and inet- logging of ipadresses to postgresql
(Martin Kähmer)
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/ulogd_BASE.c | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/extensions/ulogd_BASE.c b/extensions/ulogd_BASE.c index b383f8c..180370b 100644 --- a/extensions/ulogd_BASE.c +++ b/extensions/ulogd_BASE.c @@ -1,4 +1,4 @@ -/* ulogd_MAC.c, Version $Revision: 1.12 $ +/* ulogd_MAC.c, Version $Revision: 1.13 $ * * ulogd interpreter plugin for * o MAC addresses @@ -26,7 +26,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * $Id: ulogd_BASE.c,v 1.12 2002/06/13 12:55:21 laforge Exp $ + * $Id: ulogd_BASE.c,v 1.13 2002/08/25 15:43:51 laforge Exp $ * */ @@ -232,32 +232,23 @@ static ulog_iret_t *_interp_tcphdr(struct ulog_interpreter *ip, ret[3].flags |= ULOGD_RETF_VALID; ret[4].value.ui16 = ntohs(tcph->window); ret[4].flags |= ULOGD_RETF_VALID; + + ret[5].value.b = tcph->urg; + ret[5].flags |= ULOGD_RETF_VALID; if (tcph->urg) { - ret[5].value.b = tcph->urg; - ret[5].flags |= ULOGD_RETF_VALID; ret[6].value.ui16 = ntohs(tcph->urg_ptr); ret[6].flags |= ULOGD_RETF_VALID; } - if (tcph->ack) { - ret[7].value.b = tcph->ack; - ret[7].flags |= ULOGD_RETF_VALID; - } - if (tcph->psh) { - ret[8].value.b = tcph->psh; - ret[8].flags |= ULOGD_RETF_VALID; - } - if (tcph->rst) { - ret[9].value.b = tcph->rst; - ret[9].flags |= ULOGD_RETF_VALID; - } - if (tcph->syn) { - ret[10].value.b = tcph->syn; - ret[10].flags |= ULOGD_RETF_VALID; - } - if (tcph->fin) { - ret[11].value.b = tcph->fin; - ret[11].flags |= ULOGD_RETF_VALID; - } + ret[7].value.b = tcph->ack; + ret[7].flags |= ULOGD_RETF_VALID; + ret[8].value.b = tcph->psh; + ret[8].flags |= ULOGD_RETF_VALID; + ret[9].value.b = tcph->rst; + ret[9].flags |= ULOGD_RETF_VALID; + ret[10].value.b = tcph->syn; + ret[10].flags |= ULOGD_RETF_VALID; + ret[11].value.b = tcph->fin; + ret[11].flags |= ULOGD_RETF_VALID; return ret; } |