Searched refs:htons (Results 1 – 12 of 12) sorted by relevance
47 if((s = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) { in open_raw_socket()53 bindaddr.sll_protocol = htons(ETH_P_IP); in open_raw_socket()103 ip.tot_len = htons(sizeof(ip) + sizeof(udp) + size); in send_packet()113 udp.source = htons(sport); in send_packet()114 udp.dest = htons(dport); in send_packet()115 udp.len = htons(sizeof(udp) + size); in send_packet()121 temp = htons(IPPROTO_UDP); in send_packet()141 destaddr.sll_protocol = htons(ETH_P_IP); in send_packet()196 } else if (packet.udp.dest != htons(PORT_BOOTP_CLIENT)) { in receive_packet()
35 msg->flags = htons(FLAGS_BROADCAST); in init_dhcp_msg()
82 si_me.sin_port = htons(udpPort); in main()105 si_other.sin_port = htons(udpPort); in main()
45 addr.sin_port = htons(port); in socket_loopback_client()
51 addr.sin_port = htons(port); in socket_network_client()
44 addr.sin_port = htons(port); in socket_loopback_server()
44 addr.sin_port = htons(port); in socket_inaddr_any_server()
63 server.sin_port = htons(5037); in main()
593 addr.sin_port = htons(port); in socket_loopback_client()632 addr.sin_port = htons(port); in socket_loopback_server()683 addr.sin_port = htons(port); in socket_network_client()719 addr.sin_port = htons(port); in socket_inaddr_any_server()
25 # undef htons31 # define htons(x) ntohs(x) macro36 # define htons(x) (x) macro
163 port = htons(port); in serviceRegister()