From 09e799fde246b50d94e81753ed87f2ea59677f45 Mon Sep 17 00:00:00 2001 From: laforge Date: Thu, 16 Oct 2003 13:00:51 +0000 Subject: print AH/ESP SPI like ipt_LOG.c (Yoshihiro Kawabe) --- extensions/printpkt.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extensions/printpkt.c b/extensions/printpkt.c index 91f6e2b..a8cbf03 100644 --- a/extensions/printpkt.c +++ b/extensions/printpkt.c @@ -17,7 +17,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_LOGEMU.c,v 1.15 2003/09/28 15:19:26 laforge Exp $ + * $Id: printpkt.c,v 1.1 2003/10/10 15:56:37 laforge Exp $ * */ @@ -224,6 +224,14 @@ int printpkt_print(ulog_iret_t *res, char *buf, int prefix) break; } break; + case IPPROTO_ESP: + case IPPROTO_AH: + buf_cur += sprintf(buf_cur, "PROTO=%s ", GET_VALUE(12).ui8 == IPPROTO_ESP ? "ESP" : "AH"); + /* FIXME: "INCOMPLETE [%u bytes]" in case of short pkt */ + if (intr_ids[34].id > 0) { + buf_cur += sprintf(buf_cur, "SPI=0x%x ", GET_VALUE(34).ui32); + } + break; default: buf_cur += sprintf(buf_cur, "PROTO=%u ", GET_VALUE(11).ui8); -- cgit v1.2.3