Lines Matching refs:proto
79 static int get_socket(int family, int proto) in get_socket() argument
83 fd = socket(family, proto == IPPROTO_TCP ? SOCK_STREAM : SOCK_DGRAM, in get_socket()
84 proto); in get_socket()
135 struct sockaddr *addr, socklen_t *addrlen, int proto) in receive() argument
139 if (proto == IPPROTO_UDP) { in receive()
145 } else if (proto == IPPROTO_TCP) { in receive()
152 printf("Invalid protocol %d\n", proto); in receive()
160 struct sockaddr *addr, socklen_t addrlen, int proto) in reply() argument
164 if (proto == IPPROTO_UDP) { in reply()
169 } else if (proto == IPPROTO_TCP) { in reply()
181 printf("Invalid protocol %d\n", proto); in reply()
189 unsigned char *buf, int buflen, int proto, in udp_receive_and_reply() argument
198 (struct sockaddr *)&from, &fromlen, proto); in udp_receive_and_reply()
206 (struct sockaddr *)&from, fromlen, proto); in udp_receive_and_reply()
218 unsigned char *buf, int buflen, int proto) in tcp_receive_and_reply() argument
226 (struct sockaddr *)&from, &fromlen, proto); in tcp_receive_and_reply()
231 (struct sockaddr *)&from, fromlen, proto); in tcp_receive_and_reply()