snap_demux_handler.h
来自「一个学习SNMP项目:tmoerlan.」· C头文件 代码 · 共 32 行
H
32 行
/* * snap_demux_handler.h : functions for retrieving DEMUXed data *//* maximum size of a buffer */#define SNAP_BUFLEN 3924/* various implemented protocols */#define SNAP_UNIX 0x1#define SNAP_RAWIP 0x2#define SNAP_UDP 0x4/* used to pass a handler function */typedef void (*buffer_handler)(char*);/* has to be declared in caller application (ip portnumber) */extern short int receiveport;/* general functions */int snap_demux_init(int); /* initialize the various protocols (see defines above) */int snap_demux_receive(buffer_handler); /* receive and call handler */int snap_demux_select(); /* our select(..) wrapper */void snap_demux_close(); /* close all sockets and shut down */int snap_demux_handler(buffer_handler); /* call select(..) and receive a packet *//* buffer handler functions */void snap_demux_buffer_noop(char*); /* do nothing */void snap_demux_buffer_print(char*); /* print the contents of the buffer to stderr using local code */void snap_demux_buffer_print_unsafe(char*); /* print the contents of the buffer to stderr using fprintf */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?