|
Main serving funtion This function is the one which does the job. It is the main() of the child thread, which is created as soon as a new connection is accepted.
- Parameters:
-
ptr: | a void pointer that keeps the reference of the 'pthread_chain' value corrisponding to this thread. This variable is casted into a 'pthread_chain' value in order to retrieve the socket we're currently using, the therad ID, and some pointers to the previous and next elements into this struct. |
- Returns:
- None.
Definition at line 104 of file daemon.c.
References daemon_slpars::activeclose, daemon_checkauth(), daemon_endcapture(), daemon_findalldevs(), daemon_getstats(), daemon_getstatsnopcap(), daemon_opensource(), daemon_startcapture(), daemon_updatefilter(), errbuf, daemon_slpars::isactive, daemon_slpars::nullAuthAllowed, PCAP_BUF_SIZE, pcap_close(), PCAP_ERRBUF_SIZE, pcap_stats(), pcap_t, pcap_stat::ps_drop, pcap_stat::ps_ifdrop, pcap_stat::ps_recv, pthread_suspend(), rpcap_checkmsg(), RPCAP_MSG_CLOSE, RPCAP_MSG_ENDCAP_REQ, RPCAP_MSG_ERROR, RPCAP_MSG_FINDALLIF_REQ, RPCAP_MSG_OPEN_REQ, RPCAP_MSG_STARTCAP_REQ, RPCAP_MSG_STATS_REQ, RPCAP_MSG_UPDATEFILTER_REQ, rpcap_senderror(), RPCAP_TIMEOUT_INIT, RPCAP_TIMEOUT_RUNTIME, SOCK_ASSERT, sock_close(), sock_discard(), sock_geterror(), sock_recv(), and daemon_slpars::sockctrl.
Referenced by main_active(), and main_passive(). |