#if 1 #include #include #include #include #include #include #include "libnetlinku.h" #include "commuapinl.h" static int process_pkt(struct pdelivnl_ctrl_data *ctrl, struct nlmsghdr *n, void *arg) { printf("pdelivery main process_msg begin:\r\n"); //if (timestamp) //print_timestamp(fp); switch (n->nlmsg_type) { case NLMSG_RECV_RAW_PKT: printf("netlink msg type RAW_pkt:\r\n"); printf_mem(NLMSG_DATA(n),n->nlmsg_len-NLMSG_HDRLEN); break; default: return 0; } return 0; } int main( int argc, char **argv) { int ret = -1; ret = pdeliv_main(process_pkt); return ret; } #endif