void EventLogger::table_miss(const Packet &packet, const MatchTableAbstract &table) { typedef struct : msg_hdr_t { int table_id; } __attribute__((packed)) msg_t; msg_t msg; fill_msg_hdr(EventType::TABLE_MISS, device_id, packet, &msg); msg.table_id = table.get_id(); transport_instance->send(reinterpret_cast<char *>(&msg), sizeof(msg)); }
void EventLogger::table_hit(const Packet &packet, const MatchTableAbstract &table, entry_handle_t handle) { typedef struct : msg_hdr_t { int table_id; int entry_hdl; } __attribute__((packed)) msg_t; msg_t msg; fill_msg_hdr(EventType::TABLE_HIT, device_id, packet, &msg); msg.table_id = table.get_id(); msg.entry_hdl = static_cast<int>(handle); transport_instance->send(reinterpret_cast<char *>(&msg), sizeof(msg)); }
void EventLogger::table_hit(const Packet &packet, const MatchTableAbstract &table, entry_handle_t handle) { typedef struct : msg_hdr_t { int table_id; int entry_hdl; } __attribute__((packed)) msg_t; msg_t msg; fill_msg_hdr(EventType::TABLE_HIT, packet, &msg); msg.table_id = table.get_id(); msg.entry_hdl = (int) handle; transport_instance->send((char *) &msg, sizeof(msg)); };