Lines Matching refs:alen
265 static int tcp_md5sig(int sd, void *addr, socklen_t alen, struct sock_args *args) in tcp_md5sig() argument
282 memcpy(&md5sig.tcpm_addr, addr, alen); in tcp_md5sig()
315 int alen; in tcp_md5_remote() local
322 alen = sizeof(sin); in tcp_md5_remote()
328 alen = sizeof(sin6); in tcp_md5_remote()
335 if (tcp_md5sig(sd, addr, alen, args)) in tcp_md5_remote()
718 socklen_t alen = sizeof(local_addr); in show_sockstat() local
725 if (getsockname(sd, sa, &alen) == 0) { in show_sockstat()
738 if (getpeername(sd, sa, &alen) == 0) { in show_sockstat()
940 static int send_msg_no_cmsg(int sd, void *addr, socklen_t alen) in send_msg_no_cmsg() argument
945 err = sendto(sd, msg, msglen, 0, addr, alen); in send_msg_no_cmsg()
961 static int send_msg_cmsg(int sd, void *addr, socklen_t alen, in send_msg_cmsg() argument
975 m.msg_namelen = alen; in send_msg_cmsg()
1023 static int send_msg(int sd, void *addr, socklen_t alen, struct sock_args *args) in send_msg() argument
1036 if (send_msg_cmsg(sd, addr, alen, args->ifindex, args->version)) in send_msg()
1039 if (send_msg_no_cmsg(sd, addr, alen)) in send_msg()
1053 socklen_t alen = sizeof(addr); in socket_read_dgram() local
1057 .msg_namelen = alen, in socket_read_dgram()
1115 if (send_msg_cmsg(sd, addr, alen, in socket_read_dgram()
1129 (void *) addr, alen) < 0) in socket_read_dgram()
1202 static int stdin_to_socket(int sd, int type, void *addr, socklen_t alen) in stdin_to_socket() argument
1220 err = sendto(sd, buf, len, 0, addr, alen); in stdin_to_socket()
1249 static int msg_loop(int client, int sd, void *addr, socklen_t alen, in msg_loop() argument
1265 if (send_msg(sd, addr, alen, args)) in msg_loop()
1309 if (stdin_to_socket(sd, args->type, addr, alen) <= 0) in msg_loop()
1326 if (send_msg(sd, addr, alen, args)) { in msg_loop()
1419 socklen_t alen; in bind_socket() local
1429 alen = sizeof(serv_addr); in bind_socket()
1436 alen = sizeof(serv6_addr); in bind_socket()
1444 if (bind(sd, addr, alen) < 0) { in bind_socket()
1567 socklen_t alen = sizeof(addr); in do_server() local
1606 rc = msg_loop(0, lsd, (void *) addr, alen, args); in do_server()
1638 csd = accept(lsd, (void *) addr, &alen); in do_server()
1653 rc = msg_loop(0, csd, (void *) addr, alen, args); in do_server()
1703 static int connectsock(void *addr, socklen_t alen, struct sock_args *args) in connectsock() argument
1741 if (args->password && tcp_md5sig(sd, addr, alen, args)) in connectsock()
1747 if (connect(sd, addr, alen) < 0) { in connectsock()
1774 int alen; in do_client() local
1811 alen = sizeof(sin); in do_client()
1818 alen = sizeof(sin6); in do_client()
1827 sd = connectsock(addr, alen, args); in do_client()
1841 rc = msg_loop(1, sd, addr, alen, args); in do_client()