author | mjm <mjm> | 2002-12-04 19:51:46 (UTC) |
---|---|---|
committer | mjm <mjm> | 2002-12-04 19:51:46 (UTC) |
commit | 1f70a97d8f4ccedbfdbde72e70649f01d92f190a (patch) (unidiff) | |
tree | f1908f235fb90ed578f66bcbfa4d255090b2ed62 | |
parent | ad62016e2d341876c068bead69a40ebd0370d822 (diff) | |
download | opie-1f70a97d8f4ccedbfdbde72e70649f01d92f190a.zip opie-1f70a97d8f4ccedbfdbde72e70649f01d92f190a.tar.gz opie-1f70a97d8f4ccedbfdbde72e70649f01d92f190a.tar.bz2 |
fit to new sniffer function
-rw-r--r-- | noncore/net/wellenreiter/daemon/source/daemon.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/daemon/source/daemon.cc b/noncore/net/wellenreiter/daemon/source/daemon.cc index 6467af7..95f2f83 100644 --- a/noncore/net/wellenreiter/daemon/source/daemon.cc +++ b/noncore/net/wellenreiter/daemon/source/daemon.cc | |||
@@ -80,40 +80,40 @@ int main(int argc, char **argv) | |||
80 | /* Receive data from socket */ | 80 | /* Receive data from socket */ |
81 | if((retval=recvcomm(&sock, buffer, sizeof(buffer))) < 0) | 81 | if((retval=recvcomm(&sock, buffer, sizeof(buffer))) < 0) |
82 | { | 82 | { |
83 | wl_logerr("Error trying to read: %s", strerror(errno)); | 83 | wl_logerr("Error trying to read: %s", strerror(errno)); |
84 | break; | 84 | break; |
85 | } | 85 | } |
86 | else | 86 | else |
87 | { | 87 | { |
88 | /* check type of packet and start function according to it */ | 88 | /* check type of packet and start function according to it */ |
89 | switch(retval) | 89 | switch(retval) |
90 | { | 90 | { |
91 | case 98: | 91 | case 98: |
92 | wl_loginfo("Received STARTSNIFF command"); | 92 | wl_loginfo("Received STARTSNIFF command"); |
93 | break; | 93 | break; |
94 | case 99: | 94 | case 99: |
95 | wl_loginfo("Received STOPSNIFF command"); | 95 | wl_loginfo("Received STOPSNIFF command"); |
96 | break; | 96 | break; |
97 | default: | 97 | default: |
98 | wl_logerr("Received unknown command: %d", retval); | 98 | wl_logerr("Received unknown command: %d", retval); |
99 | break; | 99 | break; |
100 | } | 100 | } |
101 | } | 101 | } |
102 | } /* FD_ISSET */ | 102 | } /* FD_ISSET */ |
103 | 103 | ||
104 | /* Check pcap lib for packets */ | 104 | /* Check pcap lib for packets */ |
105 | if(FD_ISSET(pcap_fileno(handletopcap), &rset)) | 105 | if(FD_ISSET(pcap_fileno(handletopcap), &rset)) |
106 | { | 106 | { |
107 | 107 | ||
108 | /* Grab one single packet */ | 108 | /* Grab one single packet */ |
109 | packet = pcap_next(handletopcap, &header); | 109 | packet = pcap_next(handletopcap, &header); |
110 | 110 | ||
111 | /* process the packet */ | 111 | /* process the packet */ |
112 | process_packets(&header,*&packet); | 112 | process_packets(&header,*&packet, GUIADDR, GUIPORT); |
113 | } | 113 | } |
114 | 114 | ||
115 | } /* while(1) */ | 115 | } /* while(1) */ |
116 | 116 | ||
117 | close(sock); | 117 | close(sock); |
118 | exit(0); | 118 | exit(0); |
119 | } | 119 | } |