• Home
  • Raw
  • Download

Lines Matching refs:pars

110 static int daemon_msg_auth_req(struct daemon_slpars *pars, uint32 plen);
113 static int daemon_msg_findallif_req(struct daemon_slpars *pars, uint32 plen);
115 static int daemon_msg_open_req(struct daemon_slpars *pars, uint32 plen, char *source, size_t source…
116 static int daemon_msg_startcap_req(struct daemon_slpars *pars, uint32 plen, struct thread_handle *t…
117 static int daemon_msg_endcap_req(struct daemon_slpars *pars, struct session *session, struct thread…
119 static int daemon_msg_updatefilter_req(struct daemon_slpars *pars, struct session *session, uint32 …
122 static int daemon_msg_stats_req(struct daemon_slpars *pars, struct session *session, uint32 plen, s…
124 static int daemon_msg_setsampling_req(struct daemon_slpars *pars, uint32 plen, struct rpcap_samplin…
140 struct daemon_slpars pars; // service loop parameters in daemon_serviceloop() local
167 pars.sockctrl_in = sockctrl_in; in daemon_serviceloop()
168 pars.sockctrl_out = sockctrl_out; in daemon_serviceloop()
169 pars.protocol_version = 0; // not yet known in daemon_serviceloop()
170 pars.isactive = isactive; // active mode in daemon_serviceloop()
171 pars.nullAuthAllowed = nullAuthAllowed; in daemon_serviceloop()
206 if (!pars.isactive) in daemon_serviceloop()
213 FD_SET(pars.sockctrl_in, &rfds); in daemon_serviceloop()
215 retval = select(pars.sockctrl_in + 1, &rfds, NULL, NULL, &tv); in daemon_serviceloop()
219 if (rpcap_senderror(pars.sockctrl_out, 0, PCAP_ERR_NETW, errmsgbuf, errbuf) == -1) in daemon_serviceloop()
228 …if (rpcap_senderror(pars.sockctrl_out, 0, PCAP_ERR_INITTIMEOUT, "The RPCAP initial timeout has exp… in daemon_serviceloop()
237 nrecv = rpcapd_recv_msg_header(pars.sockctrl_in, &header); in daemon_serviceloop()
293 if (rpcap_senderror(pars.sockctrl_out, reply_version, in daemon_serviceloop()
303 if (rpcapd_discard(pars.sockctrl_in, plen) == -1) in daemon_serviceloop()
316 pars.protocol_version = header.ver; in daemon_serviceloop()
321 retval = daemon_msg_auth_req(&pars, plen); in daemon_serviceloop()
347 (void)rpcapd_discard(pars.sockctrl_in, plen); in daemon_serviceloop()
359 (void)daemon_msg_err(pars.sockctrl_in, plen); in daemon_serviceloop()
382 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
383 pars.protocol_version, PCAP_ERR_WRONGMSG, in daemon_serviceloop()
390 if (rpcapd_discard(pars.sockctrl_in, plen) == -1) in daemon_serviceloop()
418 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
419 pars.protocol_version, PCAP_ERR_WRONGMSG, in daemon_serviceloop()
426 if (rpcapd_discard(pars.sockctrl_in, plen) == -1) in daemon_serviceloop()
438 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
439 pars.protocol_version, PCAP_ERR_WRONGMSG, in daemon_serviceloop()
446 if (rpcapd_discard(pars.sockctrl_in, plen) == -1) in daemon_serviceloop()
484 if ((!pars.isactive) && ((session == NULL) || ((session != NULL) && (session->sockdata == 0)))) in daemon_serviceloop()
492 FD_SET(pars.sockctrl_in, &rfds); in daemon_serviceloop()
494 retval = select(pars.sockctrl_in + 1, &rfds, NULL, NULL, &tv); in daemon_serviceloop()
498 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
499 pars.protocol_version, PCAP_ERR_NETW, in daemon_serviceloop()
509 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
510 pars.protocol_version, in daemon_serviceloop()
522 nrecv = rpcapd_recv_msg_header(pars.sockctrl_in, &header); in daemon_serviceloop()
541 if (header.ver != pars.protocol_version) in daemon_serviceloop()
549 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
560 (void)rpcapd_discard(pars.sockctrl_in, plen); in daemon_serviceloop()
569 (void)daemon_msg_err(pars.sockctrl_in, plen); in daemon_serviceloop()
577 if (daemon_msg_findallif_req(&pars, plen) == -1) in daemon_serviceloop()
597 retval = daemon_msg_open_req(&pars, plen, source, sizeof(source)); in daemon_serviceloop()
614 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
615 pars.protocol_version, in daemon_serviceloop()
625 if (rpcapd_discard(pars.sockctrl_in, plen) == -1) in daemon_serviceloop()
632 if (daemon_msg_startcap_req(&pars, plen, &threaddata, source, &session, &samp_param) == -1) in daemon_serviceloop()
645 if (daemon_msg_updatefilter_req(&pars, session, plen) == -1) in daemon_serviceloop()
654 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
655 pars.protocol_version, in daemon_serviceloop()
682 if (daemon_msg_stats_req(&pars, session, plen, &stats, svrcapt) == -1) in daemon_serviceloop()
708 if (daemon_msg_endcap_req(&pars, session, &threaddata) == -1) in daemon_serviceloop()
721 rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
722 pars.protocol_version, in daemon_serviceloop()
732 if (daemon_msg_setsampling_req(&pars, plen, &samp_param) == -1) in daemon_serviceloop()
748 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
749 pars.protocol_version, in daemon_serviceloop()
758 if (rpcapd_discard(pars.sockctrl_in, plen) == -1) in daemon_serviceloop()
788 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
789 pars.protocol_version, PCAP_ERR_WRONGMSG, in daemon_serviceloop()
796 if (rpcapd_discard(pars.sockctrl_in, plen) == -1) in daemon_serviceloop()
809 if (rpcap_senderror(pars.sockctrl_out, in daemon_serviceloop()
810 pars.protocol_version, PCAP_ERR_WRONGMSG, in daemon_serviceloop()
817 if (rpcapd_discard(pars.sockctrl_in, plen) == -1) in daemon_serviceloop()
967 daemon_msg_auth_req(struct daemon_slpars *pars, uint32 plen) in daemon_msg_auth_req() argument
975 …status = rpcapd_recv(pars->sockctrl_in, (char *) &auth, sizeof(struct rpcap_auth), &plen, errmsgbu… in daemon_msg_auth_req()
989 if (!pars->nullAuthAllowed) in daemon_msg_auth_req()
1011 status = rpcapd_recv(pars->sockctrl_in, username, usernamelen, &plen, errmsgbuf); in daemon_msg_auth_req()
1033 status = rpcapd_recv(pars->sockctrl_in, passwd, passwdlen, &plen, errmsgbuf); in daemon_msg_auth_req()
1056 if (rpcap_senderror(pars->sockctrl_out, in daemon_msg_auth_req()
1057 pars->protocol_version, in daemon_msg_auth_req()
1090 rpcap_createhdr(&header, pars->protocol_version, RPCAP_MSG_AUTH_REPLY, 0, 0); in daemon_msg_auth_req()
1093 …if (sock_send(pars->sockctrl_out, (char *) &header, sizeof (struct rpcap_header), errbuf, PCAP_ERR… in daemon_msg_auth_req()
1101 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_auth_req()
1109 if (rpcap_senderror(pars->sockctrl_out, pars->protocol_version, in daemon_msg_auth_req()
1119 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_auth_req()
1251 daemon_msg_findallif_req(struct daemon_slpars *pars, uint32 plen) in daemon_msg_findallif_req() argument
1264 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_findallif_req()
1276 if (rpcap_senderror(pars->sockctrl_out, pars->protocol_version, in daemon_msg_findallif_req()
1326 rpcap_createhdr((struct rpcap_header *) sendbuf, pars->protocol_version, in daemon_msg_findallif_req()
1430 if (sock_send(pars->sockctrl_out, sendbuf, sendbufidx, errbuf, PCAP_ERRBUF_SIZE) == -1) in daemon_msg_findallif_req()
1442 if (rpcap_senderror(pars->sockctrl_out, pars->protocol_version, in daemon_msg_findallif_req()
1456 daemon_msg_open_req(struct daemon_slpars *pars, uint32 plen, char *source, size_t sourcelen) in daemon_msg_open_req() argument
1472 nread = sock_recv(pars->sockctrl_in, source, plen, in daemon_msg_open_req()
1499 rpcap_createhdr((struct rpcap_header *) sendbuf, pars->protocol_version, in daemon_msg_open_req()
1516 if (sock_send(pars->sockctrl_out, sendbuf, sendbufidx, errbuf, PCAP_ERRBUF_SIZE) == -1) in daemon_msg_open_req()
1524 if (rpcap_senderror(pars->sockctrl_out, pars->protocol_version, in daemon_msg_open_req()
1533 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_open_req()
1545 daemon_msg_startcap_req(struct daemon_slpars *pars, uint32 plen, struct thread_handle *threaddata, … in daemon_msg_startcap_req() argument
1575 status = rpcapd_recv(pars->sockctrl_in, (char *) &startcapreq, in daemon_msg_startcap_req()
1615 …ARTCAPREQ_FLAG_SERVEROPEN) || (startcapreq.flags & RPCAP_STARTCAPREQ_FLAG_DGRAM) || pars->isactive; in daemon_msg_startcap_req()
1627 if (getpeername(pars->sockctrl_in, (struct sockaddr *) &saddr, &saddrlen) == -1) in daemon_msg_startcap_req()
1689 session->sockctrl_out = pars->sockctrl_out; in daemon_msg_startcap_req()
1690 session->protocol_version = pars->protocol_version; in daemon_msg_startcap_req()
1693 ret = daemon_unpackapplyfilter(pars->sockctrl_in, session, &plen, errmsgbuf); in daemon_msg_startcap_req()
1710 rpcap_createhdr((struct rpcap_header *) sendbuf, pars->protocol_version, in daemon_msg_startcap_req()
1728 if (sock_send(pars->sockctrl_out, sendbuf, sendbufidx, errbuf, PCAP_ERRBUF_SIZE) == -1) in daemon_msg_startcap_req()
1787 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_startcap_req()
1828 if (rpcap_senderror(pars->sockctrl_out, pars->protocol_version, in daemon_msg_startcap_req()
1837 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_startcap_req()
1904 daemon_msg_endcap_req(struct daemon_slpars *pars, struct session *session, struct thread_handle *th… in daemon_msg_endcap_req() argument
1951 rpcap_createhdr(&header, pars->protocol_version, in daemon_msg_endcap_req()
1954 …if (sock_send(pars->sockctrl_out, (char *) &header, sizeof(struct rpcap_header), errbuf, PCAP_ERRB… in daemon_msg_endcap_req()
2040 daemon_msg_updatefilter_req(struct daemon_slpars *pars, struct session *session, uint32 plen) in daemon_msg_updatefilter_req() argument
2047 ret = daemon_unpackapplyfilter(pars->sockctrl_in, session, &plen, errmsgbuf); in daemon_msg_updatefilter_req()
2060 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_updatefilter_req()
2067 rpcap_createhdr(&header, pars->protocol_version, in daemon_msg_updatefilter_req()
2070 …if (sock_send(pars->sockctrl_out, (char *) &header, sizeof (struct rpcap_header), pcap_geterr(sess… in daemon_msg_updatefilter_req()
2080 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_updatefilter_req()
2084 rpcap_senderror(pars->sockctrl_out, pars->protocol_version, in daemon_msg_updatefilter_req()
2094 daemon_msg_setsampling_req(struct daemon_slpars *pars, uint32 plen, struct rpcap_sampling *samp_par… in daemon_msg_setsampling_req() argument
2102 …status = rpcapd_recv(pars->sockctrl_in, (char *) &rpcap_samp, sizeof(struct rpcap_sampling), &plen… in daemon_msg_setsampling_req()
2117 rpcap_createhdr(&header, pars->protocol_version, in daemon_msg_setsampling_req()
2120 …if (sock_send(pars->sockctrl_out, (char *) &header, sizeof (struct rpcap_header), errbuf, PCAP_ERR… in daemon_msg_setsampling_req()
2127 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_setsampling_req()
2135 if (rpcap_senderror(pars->sockctrl_out, pars->protocol_version, in daemon_msg_setsampling_req()
2144 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_setsampling_req()
2153 daemon_msg_stats_req(struct daemon_slpars *pars, struct session *session, uint32 plen, struct pcap_… in daemon_msg_stats_req() argument
2162 if (rpcapd_discard(pars->sockctrl_in, plen) == -1) in daemon_msg_stats_req()
2172 rpcap_createhdr((struct rpcap_header *) sendbuf, pars->protocol_version, in daemon_msg_stats_req()
2206 if (sock_send(pars->sockctrl_out, sendbuf, sendbufidx, errbuf, PCAP_ERRBUF_SIZE) == -1) in daemon_msg_stats_req()
2215 rpcap_senderror(pars->sockctrl_out, pars->protocol_version, in daemon_msg_stats_req()