/* Copyright 2021 Ryan Castellucci, MIT License */

#include <Python.h>

int nflog_add_protos(PyObject *m) {
  if (!m) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_LOOP", 0x0060) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PUP", 0x0200) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PUPAT", 0x0201) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_TSN", 0x22F0) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_ERSPAN2", 0x22EB) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_IP", 0x0800) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_X25", 0x0805) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_ARP", 0x0806) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_BPQ", 0x08FF) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_IEEEPUP", 0x0a00) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_IEEEPUPAT", 0x0a01) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_BATMAN", 0x4305) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_DEC", 0x6000) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_DNA_DL", 0x6001) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_DNA_RC", 0x6002) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_DNA_RT", 0x6003) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_LAT", 0x6004) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_DIAG", 0x6005) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_CUST", 0x6006) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_SCA", 0x6007) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_TEB", 0x6558) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_RARP", 0x8035) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_ATALK", 0x809B) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_AARP", 0x80F3) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_8021Q", 0x8100) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_ERSPAN", 0x88BE) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_IPX", 0x8137) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_IPV6", 0x86DD) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PAUSE", 0x8808) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_SLOW", 0x8809) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_WCCP", 0x883E) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_MPLS_UC", 0x8847) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_MPLS_MC", 0x8848) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_ATMMPOA", 0x884c) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PPP_DISC", 0x8863) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PPP_SES", 0x8864) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_LINK_CTL", 0x886c) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_ATMFATE", 0x8884) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PAE", 0x888E) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_AOE", 0x88A2) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_8021AD", 0x88A8) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_802_EX1", 0x88B5) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PREAUTH", 0x88C7) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_TIPC", 0x88CA) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_LLDP", 0x88CC) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_MACSEC", 0x88E5) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_8021AH", 0x88E7) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_MVRP", 0x88F5) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_1588", 0x88F7) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_NCSI", 0x88F8) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PRP", 0x88FB) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_FCOE", 0x8906) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_IBOE", 0x8915) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_TDLS", 0x890D) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_FIP", 0x8914) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_80221", 0x8917) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_HSR", 0x892F) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_NSH", 0x894F) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_LOOPBACK", 0x9000) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_QINQ1", 0x9100) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_QINQ2", 0x9200) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_QINQ3", 0x9300) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_EDSA", 0xDADA) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_DSA_8021Q", 0xDADB) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_IFE", 0xED3E) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_AF_IUCV", 0xFBFB) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_802_3_MIN", 0x0600) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_802_3", 0x0001) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_AX25", 0x0002) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_ALL", 0x0003) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_802_2", 0x0004) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_SNAP", 0x0005) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_DDCMP", 0x0006) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_WAN_PPP", 0x0007) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PPP_MP", 0x0008) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_LOCALTALK", 0x0009) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_CAN", 0x000C) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_CANFD", 0x000D) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PPPTALK", 0x0010) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_TR_802_2", 0x0011) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_MOBITEX", 0x0015) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_CONTROL", 0x0016) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_IRDA", 0x0017) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_ECONET", 0x0018) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_HDLC", 0x0019) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_ARCNET", 0x001A) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_DSA", 0x001B) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_TRAILER", 0x001C) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_PHONET", 0x00F5) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_IEEE802154", 0x00F6) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_CAIF", 0x00F7) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_XDSA", 0x00F8) != 0) { return -1; }
  if (PyModule_AddIntConstant(m, "PROTO_MAP", 0x00F9) != 0) { return -1; }
  return 0;
}
