diff options
author | laforge <laforge> | 2002-08-28 09:41:17 +0000 |
---|---|---|
committer | Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> | 2008-03-01 01:18:17 +0900 |
commit | fca3b8572642a0c5227a9d4a29a00a3994b44045 (patch) | |
tree | 948a2b9625836b162626aa67fbb9d5340700e2d0 /ulogd/extensions | |
parent | 3680c13525479fe944899da1ec1b2b91d3ca7b21 (diff) |
add support for string- and inet- logging of ipadresses to postgresql
(Martin Kähmer)
Diffstat (limited to 'ulogd/extensions')
-rw-r--r-- | ulogd/extensions/ulogd_BASE.c | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/ulogd/extensions/ulogd_BASE.c b/ulogd/extensions/ulogd_BASE.c index b383f8c..180370b 100644 --- a/ulogd/extensions/ulogd_BASE.c +++ b/ulogd/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; } |