Home
last modified time | relevance | path

Searched refs:htons (Results 1 – 25 of 69) sorted by relevance

123

/openbmc/u-boot/net/
H A Dcdp.c100 if (csum != htons(csum)) /* little endian */ in cdp_compute_csum()
101 csum = htons(csum); in cdp_compute_csum()
140 *s++ = htons(0); in cdp_send_trigger()
144 *s++ = htons(CDP_DEVICE_ID_TLV); in cdp_send_trigger()
145 *s++ = htons(CONFIG_CDP_DEVICE_ID); in cdp_send_trigger()
152 *s++ = htons(CDP_PORT_ID_TLV); in cdp_send_trigger()
158 *s++ = htons(len + 4); in cdp_send_trigger()
164 *s++ = htons(CDP_CAPABILITIES_TLV); in cdp_send_trigger()
165 *s++ = htons(8); in cdp_send_trigger()
171 *s++ = htons(CDP_VERSION_TLV); in cdp_send_trigger()
[all …]
H A Dfastboot.c63 .seq = htons(sequence_number) in fastboot_udp_send_info()
149 response_header.seq = htons(response_header.seq); in fastboot_send()
155 tmp = htons(sequence_number); in fastboot_send()
160 tmp = htons(udp_version); in fastboot_send()
163 tmp = htons(packet_size); in fastboot_send()
194 response_header.seq = htons(sequence_number); in fastboot_send()
H A Drarp.c83 rarp->ar_hrd = htons(ARP_ETHER); in rarp_request()
84 rarp->ar_pro = htons(PROT_IP); in rarp_request()
87 rarp->ar_op = htons(RARPOP_REQUEST); in rarp_request()
H A Dtftp.c327 *s++ = htons(tftp_state == STATE_SEND_RRQ ? TFTP_RRQ : in tftp_send()
330 *s++ = htons(TFTP_RRQ); in tftp_send()
358 s[0] = htons(TFTP_ACK); in tftp_send()
359 s[1] = htons(tftp_cur_block); in tftp_send()
366 s[0] = htons(TFTP_DATA); in tftp_send()
377 *s++ = htons(TFTP_ERROR); in tftp_send()
378 *s++ = htons(3); in tftp_send()
389 *s++ = htons(TFTP_ERROR); in tftp_send()
390 *s++ = htons(2); in tftp_send()
H A Darp.c67 arp->ar_hrd = htons(ARP_ETHER); in arp_raw_request()
68 arp->ar_pro = htons(PROT_IP); in arp_raw_request()
71 arp->ar_op = htons(ARPOP_REQUEST); in arp_raw_request()
166 arp->ar_op = htons(ARPOP_REPLY); in arp_receive()
H A Dnet.c1030 localip->ip_len = htons(total_len); in __net_defragment()
1467 et->et_protlen = htons(prot); in net_set_ether()
1473 vet->vet_vlan_type = htons(PROT_VLAN); in net_set_ether()
1474 vet->vet_tag = htons((0 << 5) | (myvlanid & VLAN_IDMASK)); in net_set_ether()
1475 vet->vet_type = htons(prot); in net_set_ether()
1490 vet->vet_type = htons(prot); in net_update_ether()
1493 et->et_protlen = htons(prot); in net_update_ether()
1498 et802->et_prot = htons(prot); in net_update_ether()
1514 ip->ip_len = htons(pkt_len); in net_set_ip_header()
1516 ip->ip_id = htons(net_ip_id++); in net_set_ip_header()
[all …]
H A Dlink_local.c260 if (arp->ar_op != htons(ARPOP_REQUEST) && in link_local_receive_arp()
261 arp->ar_op != htons(ARPOP_REPLY)) { in link_local_receive_arp()
280 if (arp->ar_op == htons(ARPOP_REQUEST) && in link_local_receive_arp()
H A Ddns.c53 header->flags = htons(0x100); /* standard query */ in dns_send()
54 header->nqueries = htons(1); /* Just one query */ in dns_send()
/openbmc/u-boot/drivers/net/
H A Dsandbox.c85 eth_recv->et_protlen = htons(PROT_ARP); in sandbox_eth_arp_req_to_reply()
88 arp_recv->ar_hrd = htons(ARP_ETHER); in sandbox_eth_arp_req_to_reply()
89 arp_recv->ar_pro = htons(PROT_IP); in sandbox_eth_arp_req_to_reply()
92 arp_recv->ar_op = htons(ARPOP_REPLY); in sandbox_eth_arp_req_to_reply()
184 eth_recv->et_protlen = htons(PROT_ARP); in sandbox_eth_recv_arp_req()
187 arp_recv->ar_hrd = htons(ARP_ETHER); in sandbox_eth_recv_arp_req()
188 arp_recv->ar_pro = htons(PROT_IP); in sandbox_eth_recv_arp_req()
191 arp_recv->ar_op = htons(ARPOP_REQUEST); in sandbox_eth_recv_arp_req()
227 eth_recv->et_protlen = htons(PROT_IP); in sandbox_eth_recv_ping_req()
231 ipr->ip_len = htons(IP_ICMP_HDR_SIZE); in sandbox_eth_recv_ping_req()
[all …]
H A Dsandbox-raw.c84 arp->ar_hrd = htons(ARP_ETHER); in sb_eth_raw_recv()
85 arp->ar_pro = htons(PROT_IP); in sb_eth_raw_recv()
88 arp->ar_op = htons(ARPOP_REPLY); in sb_eth_raw_recv()
111 eth->et_protlen = htons(reply_arp ? PROT_ARP : PROT_IP); in sb_eth_raw_recv()
/openbmc/u-boot/lib/efi_selftest/
H A Defi_selftest_snp.c111 p.eth_hdr.et_protlen = htons(PROT_IP); in send_dhcp_discover()
116 p.ip_udp.ip_len = htons(sizeof(struct dhcp) - in send_dhcp_discover()
118 p.ip_udp.ip_id = htons(++net_ip_id); in send_dhcp_discover()
119 p.ip_udp.ip_off = htons(IP_FLAGS_DFRAG); in send_dhcp_discover()
128 p.ip_udp.udp_src = htons(68); in send_dhcp_discover()
129 p.ip_udp.udp_dst = htons(67); in send_dhcp_discover()
130 p.ip_udp.udp_len = htons(sizeof(struct dhcp) - in send_dhcp_discover()
139 p.dhcp_hdr.flags = htons(DHCP_FLAGS_UNICAST); in send_dhcp_discover()
/openbmc/google-misc/subprojects/ncsid/src/platforms/nemora/portable/
H A Dncsi_client.c91 header->ethhdr.ethertype = htons(NCSI_ETHERTYPE); in set_header_fields()
136 htons(sizeof(ncsi_set_mac_command_t) - sizeof(ncsi_header_t)); in ncsi_cmd_set_mac()
151 cmd->hdr.payload_length = htons( in ncsi_cmd_enable_broadcast_filter()
222 htons(sizeof(ncsi_oem_simple_cmd_t) - sizeof(ncsi_header_t)); in ncsi_oem_cmd_get_host_mac()
234 htons(sizeof(ncsi_oem_simple_cmd_t) - sizeof(ncsi_header_t)); in ncsi_oem_cmd_get_filter()
247 htons(sizeof(ncsi_oem_set_filter_cmd_t) - sizeof(ncsi_header_t)); in ncsi_oem_cmd_set_filter()
255 cmd->filter.port = htons(port); in ncsi_oem_cmd_set_filter()
267 htons(sizeof(ncsi_oem_echo_cmd_t) - sizeof(ncsi_header_t)); in ncsi_oem_cmd_echo()
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-connectivity/libwebsockets/libwebsockets/
H A D0001-sll_protocol-may-be-be16.patch9 497 | sll.sll_protocol = (uint32_t)(htons((uint16_t)0x800));
25 - sll.sll_protocol = (uint32_t)(htons((uint16_t)0x800));
26 + sll.sll_protocol = (uint16_t)(htons((uint16_t)0x800));
/openbmc/qemu/net/
H A Dannounce.c104 *(uint16_t *)(buf + 12) = htons(ETH_P_RARP); /* ethertype */ in announce_self_create()
107 *(uint16_t *)(buf + 14) = htons(ARP_HTYPE_ETH); /* hardware addr space */ in announce_self_create()
108 *(uint16_t *)(buf + 16) = htons(ARP_PTYPE_IP); /* protocol addr space */ in announce_self_create()
111 *(uint16_t *)(buf + 20) = htons(ARP_OP_REQUEST_REV); /* opcode */ in announce_self_create()
/openbmc/openbmc/meta-openembedded/meta-networking/recipes-protocols/zeroconf/zeroconf/
H A D0001-zeroconf-Rename-arp_op-to-avoid-namespace-conflicts-.patch61 ap.arp.ar_pro = htons(ARP_IP_PROTO);
64 - ap.arp.ar_op = htons(arp_op);
65 + ap.arp.ar_op = htons(arpop);
/openbmc/inarp/
H A Dinarp.c118 addr.sll_protocol = htons(ETH_P_ARP); in send_arp_packet()
128 arp.eh.h_proto = htons(ETH_P_ARP); in send_arp_packet()
131 arp.arp.ar_hrd = htons(ARPHRD_ETHER); in send_arp_packet()
132 arp.arp.ar_pro = htons(ETH_P_ARP); in send_arp_packet()
135 arp.arp.ar_op = htons(ARPOP_InREPLY); in send_arp_packet()
455 inarp.arp_sd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ARP)); in main()
/openbmc/u-boot/test/dm/
H A Deth.c285 ut_assert(eth->et_protlen == htons(PROT_ARP)); in sb_check_arp_reply()
287 ut_assert(arp->ar_hrd == htons(ARP_ETHER)); in sb_check_arp_reply()
288 ut_assert(arp->ar_pro == htons(PROT_IP)); in sb_check_arp_reply()
376 ut_assert(eth->et_protlen == htons(PROT_IP)); in sb_check_ping_reply()
/openbmc/google-misc/subprojects/nemora-postd/src/
H A Dnemora.cpp91 event_data_.destination.sin_port = htons(DEFAULT_ADDRESSES_TARGET_PORT); in InitEventData()
95 event_data_.destination6.sin6_port = htons(DEFAULT_ADDRESSES_TARGET_PORT); in InitEventData()
/openbmc/libmctp/utils/
H A Dmctp-capture.c71 sll2->sll2_protocol = htons(ETH_P_MCTP); in capture_binding()
110 sll2->sll2_protocol = htons(ETH_P_MCTP); in capture_socket()
/openbmc/u-boot/include/linux/byteorder/
H A Dgeneric.h132 #undef htons
141 #define htons(x) ___htons(x) macro
/openbmc/u-boot/lib/
H A Dcrc16.c82 crc = htons(crc); in crc16_ccitt_wd_buf()
/openbmc/u-boot/tools/
H A Dncb.c24 addr.sin_port = htons (port); in main()
/openbmc/openbmc/meta-security/recipes-mac/smack/udp-smack-test/
H A Dudp_client.c62 server_addr.sin_port = htons(port); in main()
H A Dudp_server.c67 server_addr.sin_port = htons(port); in main()
/openbmc/google-misc/subprojects/ncsid/src/
H A Dncsi_sockio.cpp35 RETURN_IF_ERROR(sockfd_ = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)), in init()

123