Go to the documentation of this file.
53 static const char *OpcodeToString(uint16_t
opcode)
61 return "request_reverse";
63 return "reply_reverse";
74 const ARPHdr *arph = PacketGetARP(p);
81 PrintInet(AF_INET, arph->source_ip, srcip,
sizeof(srcip));
82 PrintInet(AF_INET, arph->dest_ip, dstip,
sizeof(dstip));
84 jb_open_object(jb,
"arp");
87 jb_set_string(jb,
"opcode", OpcodeToString(ntohs(arph->opcode)));
89 jb_set_string(jb,
"src_ip", srcip);
91 jb_set_string(jb,
"dest_ip", dstip);
101 return PacketIsARP(p);
void JSONFormatAndAddMACAddr(JsonBuilder *js, const char *key, const uint8_t *val, bool is_array)
OutputInitResult OutputJsonLogInitSub(ConfNode *conf, OutputCtx *parent_ctx)
void OutputRegisterPacketSubModule(LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, PacketLogger PacketLogFunc, PacketLogCondition PacketConditionFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a packet output sub-module.
TmEcode JsonLogThreadInit(ThreadVars *t, const void *initdata, void **data)
#define JB_SET_STRING(jb, key, val)
JsonBuilder * CreateEveHeader(const Packet *p, enum OutputJsonLogDirection dir, const char *event_type, JsonAddrInfo *addr, OutputJsonCtx *eve_ctx)
Per thread variable structure.
const char * PrintInet(int af, const void *src, char *dst, socklen_t size)
int OutputJsonBuilderBuffer(ThreadVars *tv, const Packet *p, Flow *f, JsonBuilder *js, OutputJsonThreadCtx *ctx)
void JsonArpLogRegister(void)
TmEcode JsonLogThreadDeinit(ThreadVars *t, void *data)