/openbsd/sys/net/ |
H A D | if_pflow.c | 174 htons(PFLOW_IPFIX_TMPL_SET_ID); in pflow_clone_create() 180 htons(PFLOW_IPFIX_TMPL_IPV4_ID); in pflow_clone_create() 190 htons(PFIX_IE_ingressInterface); in pflow_clone_create() 193 htons(PFIX_IE_egressInterface); in pflow_clone_create() 196 htons(PFIX_IE_packetDeltaCount); in pflow_clone_create() 199 htons(PFIX_IE_octetDeltaCount); in pflow_clone_create() 235 htons(PFIX_IE_egressInterface); in pflow_clone_create() 241 htons(PFIX_IE_octetDeltaCount); in pflow_clone_create() 700 h.version = htons(PFLOW_PROTO_5); in pflow_get_mbuf() 712 set_hdr.set_id = htons(set_id); in pflow_get_mbuf() [all …]
|
/openbsd/sys/lib/libsa/ |
H A D | arp.c | 109 ah->arp_hrd = htons(ARPHRD_ETHER); in arpwhohas() 110 ah->arp_pro = htons(ETHERTYPE_IP); in arpwhohas() 113 ah->arp_op = htons(ARPOP_REQUEST); in arpwhohas() 194 if (ah->arp_hrd != htons(ARPHRD_ETHER) || in arprecv() 195 ah->arp_pro != htons(ETHERTYPE_IP) || in arprecv() 205 if (ah->arp_op == htons(ARPOP_REQUEST)) { in arprecv() 214 if (ah->arp_op != htons(ARPOP_REPLY)) { in arprecv() 250 if (arp->arp_hrd != htons(ARPHRD_ETHER) || in arp_reply() 251 arp->arp_pro != htons(ETHERTYPE_IP) || in arp_reply() 261 if (arp->arp_op != htons(ARPOP_REQUEST)) { in arp_reply() [all …]
|
H A D | rarp.c | 94 ap->arp_hrd = htons(ARPHRD_ETHER); in rarp_getipaddress() 95 ap->arp_pro = htons(ETHERTYPE_IP); in rarp_getipaddress() 98 ap->arp_op = htons(ARPOP_REVREQUEST); in rarp_getipaddress() 179 if (ap->arp_hrd != htons(ARPHRD_ETHER) || in rarprecv() 180 ap->arp_pro != htons(ETHERTYPE_IP) || in rarprecv() 191 if (ap->arp_op != htons(ARPOP_REVREPLY)) { in rarprecv()
|
H A D | tftp.c | 116 if (htons(t->th_block) != d->xid) { in recvtftp() 166 wbuf.t.th_opcode = htons((u_short) RRQ); in tftp_makereq() 177 h->iodesc->myport = htons(tftpport + (getsecs() & 0x3ff)); in tftp_makereq() 178 h->iodesc->destport = htons(IPPORT_TFTP); in tftp_makereq() 209 wbuf.t.th_opcode = htons((u_short) ACK); in tftp_getnextblock() 210 wbuf.t.th_block = htons((u_short) h->currblock); in tftp_getnextblock() 244 wbuf.t.th_opcode = htons((u_short) ACK); in tftp_terminate() 245 wbuf.t.th_block = htons((u_short) h->currblock); in tftp_terminate() 247 wbuf.t.th_opcode = htons((u_short) ERROR); in tftp_terminate() 248 wbuf.t.th_code = htons((u_short) ENOSPACE); /* ??? */ in tftp_terminate()
|
/openbsd/gnu/usr.bin/gcc/gcc/fixinc/tests/base/sys/ |
H A D | byteorder.h | 39 static __inline__ unsigned short htons (unsigned int); 66 htons (unsigned int __arg) in htons() function 102 htons (unsigned int __arg) in htons() function 128 htons (unsigned int __arg) in htons() function 148 return htons (__arg); in ntohs()
|
/openbsd/usr.sbin/npppd/pppoe/ |
H A D | pppoe_session.c | 207 pppoe->length = htons(lpkt - sizeof(pppoe0)); in pppoe_session_output() 215 pppoe0.length = htons(lpkt); in pppoe_session_output() 257 pppoe.session_id = htons(_this->session_id); in pppoe_session_send_PADT() 263 tlv.type = htons(PPPOE_TAG_END_OF_LIST); in pppoe_session_send_PADT() 266 tlv.type = htons(PPPOE_TAG_END_OF_LIST); in pppoe_session_send_PADT() 309 pppoe.session_id = htons(_this->session_id); in pppoe_session_send_PADS() 317 tlv.type = htons(PPPOE_TAG_SERVICE_NAME); in pppoe_session_send_PADS() 318 tlv.length = htons(service_name->length); in pppoe_session_send_PADS() 333 tlv.type = htons(PPPOE_TAG_HOST_UNIQ); in pppoe_session_send_PADS() 334 tlv.length = htons(hostuniq->length); in pppoe_session_send_PADS() [all …]
|
/openbsd/libexec/spamd/ |
H A D | sync.c | 102 shost->sh_addr.sin_port = htons(port); in sync_addhost() 171 sync_out.sin_port = htons(port); in sync_init() 202 sync_in.sin_port = htons(port); in sync_init() 463 sg.sg_type = htons(SPAM_SYNC_GREY); in sync_update() 467 sg.sg_from_length = htons(fromlen); in sync_update() 468 sg.sg_to_length = htons(tolen); in sync_update() 469 sg.sg_helo_length = htons(helolen); in sync_update() 501 end.st_type = htons(SPAM_SYNC_END); in sync_update() 502 end.st_length = htons(sizeof(end)); in sync_update() 554 sd.sd_type = htons(type); in sync_addr() [all …]
|
/openbsd/sys/netinet/ |
H A D | icmp6.h | 353 #define NI_SUPTYPE_FLAG_COMPRESS htons(0x0001) 354 #define NI_FQDN_FLAG_VALIDTTL htons(0x0001) 356 #define NI_NODEADDR_FLAG_TRUNCATE htons(0x0001) 357 #define NI_NODEADDR_FLAG_ALL htons(0x0002) 358 #define NI_NODEADDR_FLAG_COMPAT htons(0x0004) 359 #define NI_NODEADDR_FLAG_LINKLOCAL htons(0x0008) 360 #define NI_NODEADDR_FLAG_SITELOCAL htons(0x0010) 361 #define NI_NODEADDR_FLAG_GLOBAL htons(0x0020) 362 #define NI_NODEADDR_FLAG_ANYCAST htons(0x0040) /* not in spec */ 431 #define ICMP6_RR_RESULT_FLAGS_OOB htons(0x0002) [all …]
|
/openbsd/sbin/dhcp6leased/ |
H A D | frontend.c | 319 duid.type = htons(DUID_UUID_TYPE); in frontend_dispatch_main() 772 opt_hdr.code = htons(DHO_CLIENTID); in build_packet() 785 opt_hdr.code = htons(DHO_SERVERID); in build_packet() 799 opt_hdr.code = htons(DHO_IA_PD); in build_packet() 811 opt_hdr.code = htons(DHO_IA_PREFIX); in build_packet() 841 opt_hdr.code = htons(DHO_ORO); in build_packet() 851 opt_hdr.code = htons(DHO_ELAPSED_TIME); in build_packet() 852 opt_hdr.len = htons(2); in build_packet() 860 opt_hdr.code = htons(DHO_RAPID_COMMIT); in build_packet() 861 opt_hdr.len = htons(0); in build_packet() [all …]
|
/openbsd/usr.sbin/ldpd/ |
H A D | init.c | 386 parms.type = htons(TLV_TYPE_COMMONSESSION); in gen_init_prms_tlv() 387 parms.length = htons(SESS_PRMS_LEN); in gen_init_prms_tlv() 388 parms.proto_version = htons(LDP_VERSION); in gen_init_prms_tlv() 389 parms.keepalive_time = htons(nbr_get_keepalive(nbr->af, nbr->id)); in gen_init_prms_tlv() 405 cap.type = htons(TLV_TYPE_DYNAMIC_CAP); in gen_cap_dynamic_tlv() 406 cap.length = htons(CAP_TLV_DYNAMIC_LEN); in gen_cap_dynamic_tlv() 419 cap.type = htons(TLV_TYPE_TWCARD_CAP); in gen_cap_twcard_tlv() 420 cap.length = htons(CAP_TLV_TWCARD_LEN); in gen_cap_twcard_tlv() 433 cap.type = htons(TLV_TYPE_UNOTIF_CAP); in gen_cap_unotif_tlv() 434 cap.length = htons(CAP_TLV_UNOTIF_LEN); in gen_cap_unotif_tlv()
|
H A D | labelmapping.c | 448 lt.length = htons(LABEL_TLV_LEN); in gen_label_tlv() 471 switch (htons(lt.type)) { in tlv_decode_label() 507 rt.length = htons(REQID_TLV_LEN); in gen_reqid_tlv() 574 ft.type = htons(TLV_TYPE_FEC); in gen_fec_tlv() 590 family = htons(AF_IPV4); in gen_fec_tlv() 593 family = htons(AF_IPV6); in gen_fec_tlv() 613 ft.length = htons(len); in gen_fec_tlv() 620 pw_type = htons(pw_type); in gen_fec_tlv() 650 ft.length = htons(len); in gen_fec_tlv() 662 family = htons(AF_IPV4); in gen_fec_tlv() [all …]
|
H A D | hello.c | 415 parms.type = htons(TLV_TYPE_COMMONHELLO); in gen_hello_prms_tlv() 416 parms.length = htons(sizeof(parms.holdtime) + sizeof(parms.flags)); in gen_hello_prms_tlv() 417 parms.holdtime = htons(holdtime); in gen_hello_prms_tlv() 418 parms.flags = htons(flags); in gen_hello_prms_tlv() 429 parms.type = htons(type); in gen_opt4_hello_prms_tlv() 430 parms.length = htons(sizeof(parms.value)); in gen_opt4_hello_prms_tlv() 442 parms.type = htons(type); in gen_opt16_hello_prms_tlv() 443 parms.length = htons(sizeof(parms.value)); in gen_opt16_hello_prms_tlv() 470 if (tlv.type != htons(TLV_TYPE_COMMONHELLO)) in tlv_decode_hello_prms()
|
/openbsd/usr.sbin/eigrpd/ |
H A D | tlv.c | 36 tp.type = htons(TLV_TYPE_PARAMETER); in gen_parameter_tlv() 37 tp.length = htons(TLV_TYPE_PARAMETER_LEN); in gen_parameter_tlv() 47 tp.holdtime = htons(ei->hello_holdtime); in gen_parameter_tlv() 61 tlv.type = htons(TLV_TYPE_SEQ); in gen_sequence_tlv() 105 ts.type = htons(TLV_TYPE_SW_VERSION); in gen_sw_version_tlv() 106 ts.length = htons(TLV_TYPE_SW_VERSION_LEN); in gen_sw_version_tlv() 125 tm.type = htons(TLV_TYPE_MCAST_SEQ); in gen_mcast_seq_tlv() 126 tm.length = htons(TLV_TYPE_MCAST_SEQ_LEN); in gen_mcast_seq_tlv() 191 tlv.type = htons(tlv.type); in gen_route_tlv() 222 emetric.reserved = htons(emetric.reserved); in gen_route_tlv()
|
/openbsd/usr.sbin/rbootd/ |
H A D | rmpproto.c | 179 rpl->r_brpl.rmp_version = htons(RMP_VERSION); in SendServerID() 232 rpl->r_brpl.rmp_version = htons(RMP_VERSION); in SendFileNo() 301 rpl->r_brpl.rmp_session = htons(GenSessID()); in SendBootRepl() 302 rpl->r_brpl.rmp_version = htons(RMP_VERSION); in SendBootRepl() 441 req->r_rrq.rmp_size = htons(RMPREADDATA); in SendReadRepl() 562 rconn->rmp.hp_hdr.len = htons(rconn->rmplen - sizeof(struct hp_hdr)); in SendPacket() 567 rconn->rmp.hp_llc.dxsap = htons(HPEXT_SXSAP); in SendPacket() 568 rconn->rmp.hp_llc.sxsap = htons(HPEXT_DXSAP); in SendPacket()
|
/openbsd/games/monop/ |
H A D | initdeck.c | 109 deck[0].num_cards = htons(deck[0].num_cards); in main() 111 deck[0].top_card = htons(deck[0].top_card); in main() 116 deck[1].num_cards = htons(deck[1].num_cards); in main() 118 deck[1].top_card = htons(deck[1].top_card); in main() 189 num = htons(num); in putem() 207 num = htons(num); in putem()
|
/openbsd/gnu/usr.bin/binutils/gdb/rdi-share/ |
H A D | etherdrv.c | 233 local.sin_port = htons(0); in open_socket() 287 ia->sin_port = htons(CTRL_PORT); in fetch_ports() 351 ports[DBUG_INDEX] = htons(*sptr); in fetch_ports() 353 ports[APPL_INDEX] = htons(*sptr); in fetch_ports() 446 htons(from.sin_port)); in read_packet() 627 ia->sin_port = htons(ports[DBUG_INDEX]); in EthernetWrite() 629 ia->sin_port = htons(ports[APPL_INDEX]); in EthernetWrite()
|
/openbsd/sys/netinet6/ |
H A D | mld6.c | 98 u_int16_t rtalert_code = htons((u_int16_t)IP6OPT_RTALERT_MLD); in mld6_init() 130 all_nodes.s6_addr16[1] = htons(in6m->in6m_ifidx); in mld6_start_listening() 158 all_nodes.s6_addr16[1] = htons(in6m->in6m_ifidx); in mld6_stop_listening() 160 all_routers.s6_addr16[1] = htons(in6m->in6m_ifidx); in mld6_stop_listening() 235 htons(ifp->if_index); /* XXX */ in mld6_input() 257 all_nodes.s6_addr16[1] = htons(ifp->if_index); in mld6_input() 308 htons(ifp->if_index); /* XXX */ in mld6_input()
|
/openbsd/usr.sbin/ripd/ |
H A D | message.c | 112 dst.sin_port = htons(RIP_PORT); in send_triggered_update() 122 afi = htons(AF_INET); in send_triggered_update() 160 port = htons(nbr->port); in send_request() 165 port = htons(RIP_PORT); in send_request() 191 afi = htons(AF_INET); in send_request() 236 port = htons(nbr->port); in send_response() 241 port = htons(RIP_PORT); in send_response() 260 afi = htons(AF_INET); in send_response()
|
/openbsd/gnu/usr.bin/cvs/vms/ |
H A D | rcmd.c | 34 remote_isa.sin_port = htons(remote_port); in rcmd() 63 local_isa.sin_port = htons(local_port); in rcmd() 78 local_isa.sin_port = htons(local_port); in rcmd()
|
/openbsd/lib/libc/net/ |
H A D | htons.c | 9 #undef htons 12 htons(uint16_t x) in htons() function
|
/openbsd/usr.sbin/nsd/ |
H A D | zonec.c | 450 a[0] = htons(ui[0]); in zparser_conv_ilnp64() 451 a[1] = htons(ui[1]); in zparser_conv_ilnp64() 452 a[2] = htons(ui[2]); in zparser_conv_ilnp64() 453 a[3] = htons(ui[3]); in zparser_conv_ilnp64() 670 type = htons(type); in zparser_conv_rrtype() 840 r[3] = htons(port); in zparser_conv_svcbparam_port_value() 1027 r[2] = htons(wire_len); in zparser_conv_svcbparam_ech_value() 1108 r[2] = htons(dst_len); in zparser_conv_svcbparam_alpn_value() 1145 r[1] = htons(svcparamkey); in zparser_conv_svcbparam_key_value() 1146 r[2] = htons(val_len); in zparser_conv_svcbparam_key_value() [all …]
|
/openbsd/usr.sbin/ospf6d/ |
H A D | rde.c | 1422 v = lsa_find(iface, htons(LSA_TYPE_LINK), in RB_GENERATE() 1437 v = lsa_find(iface, htons(LSA_TYPE_LINK), in RB_GENERATE() 1468 lsa->hdr.age = numprefix == 0 ? htons(MAX_AGE) : htons(DEFAULT_AGE); in RB_GENERATE() 1473 lsa->hdr.len = htons(len); in RB_GENERATE() 1561 lsa_prefix->metric = htons(iface->metric); in orig_intra_lsa_rtr() 1594 lsa->hdr.age = numprefix == 0 ? htons(MAX_AGE) : htons(DEFAULT_AGE); in orig_intra_lsa_rtr() 1599 lsa->hdr.len = htons(len); in orig_intra_lsa_rtr() 1670 lsa->hdr.age = htons(age); in orig_asext_lsa() 1671 lsa->hdr.type = htons(LSA_TYPE_EXTERNAL); in orig_asext_lsa() 1674 lsa->hdr.len = htons(len); in orig_asext_lsa() [all …]
|
H A D | ospfe.c | 852 htons(iface->metric); in orig_rtr_lsa() 918 htons(iface->metric); in orig_rtr_lsa() 963 lsa_hdr.age = htons(DEFAULT_AGE); in orig_rtr_lsa() 964 lsa_hdr.type = htons(LSA_TYPE_ROUTER); in orig_rtr_lsa() 969 lsa_hdr.len = htons(ibuf_size(buf)); in orig_rtr_lsa() 1024 lsa_hdr.age = htons(DEFAULT_AGE); in orig_net_lsa() 1026 lsa_hdr.age = htons(MAX_AGE); in orig_net_lsa() 1033 lsa_hdr.len = htons(ibuf_size(buf)); in orig_net_lsa() 1125 lsa_hdr.age = htons(DEFAULT_AGE); in orig_link_lsa() 1126 lsa_hdr.type = htons(LSA_TYPE_LINK); in orig_link_lsa() [all …]
|
/openbsd/usr.sbin/npppd/pptp/ |
H A D | pptp_call.c | 308 sli->peers_call_id = htons(sli->peers_call_id); 373 cdn->call_id = htons(cdn->call_id); in pptp_call_send_CDN() 374 cdn->cause_code = htons(cdn->cause_code); in pptp_call_send_CDN() 413 ocrp->call_id = htons(ocrp->call_id); in pptp_call_send_OCRP() 414 ocrp->peers_call_id = htons(ocrp->peers_call_id); in pptp_call_send_OCRP() 415 ocrp->cause_code = htons(ocrp->cause_code); in pptp_call_send_OCRP() 416 ocrp->connect_speed = htons(ocrp->connect_speed); in pptp_call_send_OCRP() 417 ocrp->recv_winsz = htons(ocrp->recv_winsz); in pptp_call_send_OCRP() 586 grehdr->protocol_type = htons(PPTP_GRE_PROTOCOL_TYPE); in pptp_call_gre_output() 587 grehdr->payload_length = htons(lpkt); in pptp_call_gre_output() [all …]
|
/openbsd/usr.bin/tftp/ |
H A D | tftp.c | 159 dp->th_opcode = htons((u_short)DATA); in sendfile() 160 dp->th_block = htons(block); in sendfile() 305 ap->th_opcode = htons((u_short)ACK); in recvfile() 306 ap->th_block = htons(block); in recvfile() 410 ap->th_opcode = htons((u_short)ACK); in recvfile() 411 ap->th_block = htons(block); in recvfile() 448 tp->th_opcode = htons((u_short)request); in makerequest() 488 tp->th_opcode = htons((u_short)ERROR); in nak() 489 tp->th_code = htons((u_short)error); in nak()
|