]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
print AH/ESP SPI like ipt_LOG.c (Yoshihiro Kawabe)
authorlaforge <laforge>
Thu, 16 Oct 2003 13:00:51 +0000 (13:00 +0000)
committerlaforge <laforge>
Thu, 16 Oct 2003 13:00:51 +0000 (13:00 +0000)
extensions/printpkt.c

index 91f6e2b17b524a09ca4e981f88f2f0f58518ff78..a8cbf030ad436ff13b616a68524f08d241522f81 100644 (file)
@@ -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);