diff options
| author | liuwentan <[email protected]> | 2022-08-09 15:58:46 +0800 |
|---|---|---|
| committer | liuwentan <[email protected]> | 2022-08-09 15:58:46 +0800 |
| commit | c2d5b9cdb700da2ba2cca4105200248632f024d6 (patch) | |
| tree | a7745083e8e220134bc519896d1bcd8ee8ce7464 /src/main.cpp | |
| parent | 7442cb09d560eaef36755965cb00f944b98c42cd (diff) | |
[PACKET_IO] add pio_packet structure for pcap_live/pcap_file mode
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 8b8501d..5b2e558 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,18 +29,20 @@ void packet_io_loop(struct packet_io_loop_arg *arg) int fetch_num = packet_io_device_rx(arg->dev, arg->thread_id, &rx_pkt, 1); if(fetch_num > 0) { + /* event = session_manager_commit(rx_pkt); while(event) { plugin_manager_dispatch(event); event = session_manager_fetch_event(); - } - + }*/ + printf("fetch_num:%d\n", fetch_num); //clean session_manager event queue packet_io_device_tx(arg->dev, arg->thread_id, &rx_pkt, 1); } else { + printf("no fetch num\n"); //dispatch to time event //dispatch to trigger polling event @@ -79,9 +81,11 @@ int main(int argc, char ** argv) /* packet io init */ packet_io_init("stellar", g_engine_instance.config.packet_io.mode, 2); - session_manager_session_event_register(http_decoder, SESSION_TYPE_HTTP); - - + //session_manager_session_event_register(http_decoder, SESSION_TYPE_HTTP); + struct packet_io_loop_arg arg; + while (1) { + //packet_io_loop(); + } //create_worker_thread //main_loop |
