Lines Matching refs:protocol

36 static int _tcp_socket(int type, int protocol);
37 static int _udp_socket(int type, int protocol);
38 static int _uds_socket(int type, int protocol);
39 static int _raw_socket(int type, int protocol);
46 __socket(int domain, int type, int protocol) in __socket() argument
53 m.m_lc_vfs_socket.protocol = protocol; in __socket()
58 int socket(int domain, int type, int protocol) in socket() argument
62 r = __socket(domain, type, protocol); in socket()
70 domain, type, protocol); in socket()
74 return _uds_socket(type, protocol); in socket()
79 return _tcp_socket(type, protocol); in socket()
81 return _udp_socket(type, protocol); in socket()
83 return _raw_socket(type, protocol); in socket()
109 static int _tcp_socket(int type, int protocol) in _tcp_socket() argument
113 if (protocol != 0 && protocol != IPPROTO_TCP) in _tcp_socket()
116 fprintf(stderr, "socket(tcp): bad protocol %d\n", protocol); in _tcp_socket()
127 static int _udp_socket(int type, int protocol) in _udp_socket() argument
132 if (protocol != 0 && protocol != IPPROTO_UDP) in _udp_socket()
135 fprintf(stderr, "socket(udp): bad protocol %d\n", protocol); in _udp_socket()
160 static int _raw_socket(int type, int protocol) in _raw_socket() argument
166 if (protocol != IPPROTO_ICMP && protocol != IPPROTO_UDP && protocol != 0) in _raw_socket()
169 fprintf(stderr, "socket(icmp): bad protocol %d\n", protocol); in _raw_socket()
183 if(protocol) { in _raw_socket()
185 ipopt.nwio_proto = protocol; in _raw_socket()
203 static int _uds_socket(int type, int protocol) in _uds_socket() argument
215 if (protocol != 0) in _uds_socket()
218 fprintf(stderr, "socket(uds): bad protocol %d\n", protocol); in _uds_socket()