Home | History | Annotate | Download | only in linux

Lines Matching full:packet

108     char packet[1024];
112 int n = recvfrom(tunnel, packet, sizeof(packet), 0,
117 packet[n] = 0;
118 } while (packet[0] != 0 || strcmp(secret, &packet[1]));
201 // Send the parameters several times in case of packet loss.
206 // Allocate the buffer for a single packet.
207 char packet[32767];
219 // Read the outgoing packet from the input stream.
220 int length = read(interface, packet, sizeof(packet));
222 // Write the outgoing packet to the tunnel.
223 send(tunnel, packet, length, MSG_NOSIGNAL);
234 // Read the incoming packet from the tunnel.
235 length = recv(tunnel, packet, sizeof(packet), 0);
241 if (packet[0] != 0) {
242 // Write the incoming packet to the output stream.
243 write(interface, packet, length);
268 packet[0] = 0;
270 send(tunnel, packet, 1, MSG_NOSIGNAL);