/freebsd/contrib/unbound/dnstap/ |
H A D | dnstap_fstrm.c | 66 control[1] = htonl(4+4+4+strlen(contenttype)); in fstrm_create_control_frame_start() 67 control[2] = htonl(FSTRM_CONTROL_FRAME_START); in fstrm_create_control_frame_start() 68 control[3] = htonl(FSTRM_CONTROL_FIELD_TYPE_CONTENT_TYPE); in fstrm_create_control_frame_start() 69 control[4] = htonl(strlen(contenttype)); in fstrm_create_control_frame_start() 89 control[1] = htonl(4); in fstrm_create_control_frame_stop() 90 control[2] = htonl(FSTRM_CONTROL_FRAME_STOP); in fstrm_create_control_frame_stop() 114 control[1] = htonl(4+4+4+strlen(contenttype)); in fstrm_create_control_frame_ready() 115 control[2] = htonl(FSTRM_CONTROL_FRAME_READY); in fstrm_create_control_frame_ready() 116 control[3] = htonl(FSTRM_CONTROL_FIELD_TYPE_CONTENT_TYPE); in fstrm_create_control_frame_ready() 117 control[4] = htonl(strlen(contenttype)); in fstrm_create_control_frame_ready() [all …]
|
/freebsd/contrib/ntp/ntpd/ |
H A D | ntp_request.c | 1042 ip->timereceived = htonl((u_int32)(current_time - pp->timereceived)); in peer_stats() 1043 ip->timetosend = htonl(pp->nextdate - current_time); in peer_stats() 1044 ip->timereachable = htonl((u_int32)(current_time - pp->timereachable)); in peer_stats() 1045 ip->sent = htonl((u_int32)(pp->sent)); in peer_stats() 1046 ip->processed = htonl((u_int32)(pp->processed)); in peer_stats() 1047 ip->badauth = htonl((u_int32)(pp->badauth)); in peer_stats() 1048 ip->bogusorg = htonl((u_int32)(pp->bogusorg)); in peer_stats() 1049 ip->oldpkt = htonl((u_int32)(pp->oldpkt)); in peer_stats() 1050 ip->seldisp = htonl((u_int32)(pp->seldisptoolarge)); in peer_stats() 1051 ip->selbroken = htonl((u_int3 in peer_stats() [all...] |
H A D | ntp_crypto.c | 255 header[2] = htonl(keyno); in session_key() 256 header[3] = htonl(private); in session_key() 265 header[8] = htonl(keyno); in session_key() 266 header[9] = htonl(private); in session_key() 376 ap->seq = htonl(peer->keynumber); in make_keylist() 377 ap->key = htonl(keyid); in make_keylist() 378 vp->tstamp = htonl(tstamp); in make_keylist() 380 vp->vallen = htonl(sizeof(struct autokey)); in make_keylist() 391 vp->siglen = htonl(len); in make_keylist() 538 fp->associd = htonl(pee in crypto_recv() [all...] |
/freebsd/sys/fs/nfs/ |
H A D | xdr_subs.h | 50 #define txdr_unsigned(v) (htonl((int32_t)(v))) 61 ((struct nfsv2_time *)(t))->nfsv2_sec = htonl((f)->tv_sec); \ 63 ((struct nfsv2_time *)(t))->nfsv2_usec = htonl((f)->tv_nsec / 1000); \ 74 ((struct nfsv3_time *)(t))->nfsv3_sec = htonl((f)->tv_sec); \ 75 ((struct nfsv3_time *)(t))->nfsv3_nsec = htonl((f)->tv_nsec); \ 86 ((struct nfsv4_time *)(t))->nfsv4_sec = htonl((f)->tv_sec); \ 87 ((struct nfsv4_time *)(t))->nfsv4_nsec = htonl((f)->tv_nsec); \ 97 t[0] = htonl((u_int32_t)(f >> 32)); in txdr_hyper() 98 t[1] = htonl((u_int32_t)(f & 0xffffffff)); in txdr_hyper()
|
/freebsd/sys/contrib/openzfs/module/icp/algs/aes/ |
H A D | aes_impl.c | 90 htonl(*(uint32_t *)(void *)&cipherKey[j]); in aes_init_keysched() 130 buffer[0] = htonl(*(uint32_t *)(void *)&pt[0]); in aes_encrypt_block() 131 buffer[1] = htonl(*(uint32_t *)(void *)&pt[4]); in aes_encrypt_block() 132 buffer[2] = htonl(*(uint32_t *)(void *)&pt[8]); in aes_encrypt_block() 133 buffer[3] = htonl(*(uint32_t *)(void *)&pt[12]); in aes_encrypt_block() 141 *(uint32_t *)(void *)&ct[0] = htonl(buffer[0]); in aes_encrypt_block() 142 *(uint32_t *)(void *)&ct[4] = htonl(buffer[1]); in aes_encrypt_block() 143 *(uint32_t *)(void *)&ct[8] = htonl(buffer[2]); in aes_encrypt_block() 144 *(uint32_t *)(void *)&ct[12] = htonl(buffer[3]); in aes_encrypt_block() 177 buffer[0] = htonl(*(uint32_t *)(void *)&ct[0]); in aes_decrypt_block() [all …]
|
/freebsd/tests/sys/netinet/libalias/ |
H A D | util.c | 42 struct in_addr masq = { htonl(0x01020304) }; 43 struct in_addr pub = { htonl(0x0102dead) }; 44 struct in_addr pub2 = { htonl(0x0102beef) }; 45 struct in_addr prv1 = { htonl(0x0a00dead) }; 46 struct in_addr prv2 = { htonl(0xac10dead) }; 47 struct in_addr prv3 = { htonl(0xc0a8dead) }; 48 struct in_addr cgn = { htonl(0x6440dead) }; 49 struct in_addr ext = { htonl(0x12345678) };
|
H A D | perf.c | 118 prv1.s_addr &= htonl(0xffff0000); in main() 119 ext.s_addr &= htonl(0xffff0000); in main() 125 prv2.s_addr &= htonl(0xffff0000); in main() 150 batch[i].src.s_addr = prv1.s_addr | htonl(rand_range(0, 0xffff)); in main() 151 batch[i].dst.s_addr = ext.s_addr | htonl(rand_range(0, 0xffff)); in main() 180 p->ip_src.s_addr = ext.s_addr & htonl(0xfff00000); in main() 181 p->ip_src.s_addr |= htonl(rand_range(0, 0xffff)); in main() 201 p->ip_src.s_addr = ext.s_addr & htonl(0xfff00000); in main() 202 p->ip_src.s_addr |= htonl(rand_range(0, 0xffff)); in main()
|
/freebsd/sys/nfs/ |
H A D | xdr_subs.h | 50 #define txdr_unsigned(v) (htonl((int32_t)(v))) 62 ((struct nfsv2_time *)(t))->nfsv2_sec = htonl((f)->tv_sec); \ 64 ((struct nfsv2_time *)(t))->nfsv2_usec = htonl((f)->tv_nsec / 1000); \ 76 ((struct nfsv3_time *)(t))->nfsv3_sec = htonl((f)->tv_sec); \ 77 ((struct nfsv3_time *)(t))->nfsv3_nsec = htonl((f)->tv_nsec); \ 87 t[0] = htonl((u_int32_t)(f >> 32)); in txdr_hyper() 88 t[1] = htonl((u_int32_t)(f & 0xffffffff)); in txdr_hyper()
|
/freebsd/sbin/ipf/libipf/ |
H A D | gethost.c | 22 hostp->in4.s_addr = htonl(0xfedcba98); in gethost() 26 hostp->i6[0] = htonl(0xfe80aa55); in gethost() 27 hostp->i6[1] = htonl(0x12345678); in gethost() 28 hostp->i6[2] = htonl(0x5a5aa5a5); in gethost() 29 hostp->i6[3] = htonl(0xfedcba98); in gethost() 51 hostp->in4.s_addr = htonl(n->n_net & 0xffffffff); in gethost()
|
H A D | fill6bits.c | 32 msk[3] = htonl(msk[3] << (128 - bits)); in fill6bits() 35 msk[2] = htonl(msk[2] << (96 - bits)); in fill6bits() 39 msk[1] = htonl(msk[1] << (64 - bits)); in fill6bits() 44 msk[0] = htonl(msk[0] << (32 - bits)); in fill6bits()
|
/freebsd/sys/netgraph/netflow/ |
H A D | netflow_v9.c | 218 header->sys_uptime = htonl(MILLIUPTIME(time_uptime)); in export9_send() 220 header->unix_secs = htonl(ts.tv_sec); in export9_send() 221 header->seq_num = htonl(atomic_fetchadd_32(&fe->flow9_seq, 1)); in export9_send() 223 header->source_id = htonl(fe->domain_id); in export9_send() 272 rec->i_packets = htonl(fed->packets); in export9_add() 273 rec->i_octets = htonl(fed->bytes); in export9_add() 274 rec->o_packets = htonl(0); in export9_add() 275 rec->o_octets = htonl(0); in export9_add() 276 rec->first = htonl(MILLIUPTIME(fed->first)); in export9_add() 277 rec->last = htonl(MILLIUPTIME(fed->last)); in export9_add() [all …]
|
/freebsd/stand/libsa/ |
H A D | rpc.c | 140 auth->authtype = htonl(RPCAUTH_NULL); in rpc_call() 148 auth->authtype = htonl(RPCAUTH_UNIX); in rpc_call() 149 auth->authlen = htonl(sizeof(struct auth_unix)); in rpc_call() 155 call->rp_xid = htonl(rpc_xid); in rpc_call() 156 call->rp_direction = htonl(RPC_CALL); in rpc_call() 157 call->rp_rpcvers = htonl(RPC_VER2); in rpc_call() 158 call->rp_prog = htonl(prog); in rpc_call() 159 call->rp_vers = htonl(vers); in rpc_call() 160 call->rp_proc = htonl(proc); in rpc_call() 403 args->prog = htonl(prog); in rpc_getport() [all …]
|
H A D | bootparam.c | 142 args->prog = htonl(BOOTPARAM_PROG); in bp_whoami() 143 args->vers = htonl(BOOTPARAM_VERS); in bp_whoami() 144 args->proc = htonl(BOOTPARAM_WHOAMI); in bp_whoami() 145 args->arglen = htonl(sizeof(struct xdr_inaddr)); in bp_whoami() 331 *lenp = htonl(len); in xdr_string_encode() 381 xi->atype = htonl(1); in xdr_inaddr_encode() 390 *ip++ = htonl((unsigned int)*cp++); in xdr_inaddr_encode() 391 *ip++ = htonl((unsigned int)*cp++); in xdr_inaddr_encode() 392 *ip++ = htonl((unsigned int)*cp++); in xdr_inaddr_encode() 393 *ip++ = htonl((unsigned int)*cp++); in xdr_inaddr_encode() [all …]
|
H A D | nfs.c | 214 args->len = htonl(len); in nfs_getrootfh() 276 args->fhsize = htonl(d->fhsize); in nfs_lookupfh() 282 args->fhplusname[pos++] = htonl(len); in nfs_lookupfh() 348 args->fhsize = htonl(d->fhsize); in nfs_readlink() 417 args->fhsize = htonl(d->fhsize); in nfs_readdata() 421 args->fhoffcnt[pos++] = htonl((uint32_t)off); in nfs_readdata() 424 args->fhoffcnt[pos] = htonl((uint32_t)len); in nfs_readdata() 508 nfs_root_node.fa.fa_type = htonl(NFDIR); in nfs_open() 509 nfs_root_node.fa.fa_mode = htonl(0755); in nfs_open() 510 nfs_root_node.fa.fa_nlink = htonl(2); in nfs_open() [all …]
|
/freebsd/usr.bin/talk/ |
H A D | invite.c | 77 msg.id_num = htonl(-1); /* an impossible id_num */ in invite_remote() 104 msg.id_num = htonl(local_id); in invite_remote() 106 msg.id_num = htonl(remote_id); in invite_remote() 124 msg.id_num = htonl(remote_id + 1); in re_invite() 176 msg.id_num = htonl(remote_id); in send_delete() 182 msg.id_num = htonl(local_id); in send_delete()
|
/freebsd/crypto/openssh/openbsd-compat/ |
H A D | sha1.h | 44 x[0] = htonl(x[0]); \ 45 x[1] = htonl(x[1]); \ 46 x[2] = htonl(x[2]); \ 47 x[3] = htonl(x[3]); \ 48 x[4] = htonl(x[4]); } while (0)
|
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/ |
H A D | tst.inet_ntoa.d | 47 *ip4a = htonl(0xc0a80117); 48 *ip4b = htonl(0x7f000001); 49 *ip4c = htonl(0xffffffff); 50 *ip4d = htonl(0x00000000);
|
/freebsd/sys/netinet/ |
H A D | ip_ecn.c | 170 *outer &= ~htonl(0xff << 20); in ip6_ecn_ingress() 171 *outer |= htonl((u_int32_t)outer8 << 20); in ip6_ecn_ingress() 187 *inner &= ~htonl(0xff << 20); in ip6_ecn_egress() 188 *inner |= htonl((u_int32_t)inner8 << 20); in ip6_ecn_egress()
|
/freebsd/sys/netpfil/ipfilter/netinet/ |
H A D | ip_sync.c | 303 td->td_end = htonl(td->td_end); in ipf_sync_tcporder() 304 td->td_maxend = htonl(td->td_maxend); in ipf_sync_tcporder() 326 n->nat_age = htonl(n->nat_age); in ipf_sync_natorder() 327 n->nat_flags = htonl(n->nat_flags); in ipf_sync_natorder() 328 n->nat_ipsumd = htonl(n->nat_ipsumd); in ipf_sync_natorder() 329 n->nat_use = htonl(n->nat_use); in ipf_sync_natorder() 330 n->nat_dir = htonl(n->nat_dir); in ipf_sync_natorder() 357 ips->is_hv = htonl(ips->is_hv); in ipf_sync_storder() 358 ips->is_die = htonl(ips->is_die); in ipf_sync_storder() 359 ips->is_pass = htonl(ips->is_pass); in ipf_sync_storder() [all …]
|
/freebsd/usr.bin/gencat/ |
H A D | gencat.c | 526 cat_hdr->__magic = htonl(_NLS_MAGIC); 527 cat_hdr->__nsets = htonl(nsets); 528 cat_hdr->__mem = htonl(msgcat_size - sizeof(struct _nls_cat_hdr)); 530 htonl(nsets * sizeof(struct _nls_set_hdr)); 532 htonl(nsets * sizeof(struct _nls_set_hdr) + 556 msg_hdr->__msgno = htonl(msg->msgId); 557 msg_hdr->__msglen = htonl(msg_len); 558 msg_hdr->__offset = htonl(msg_offset); 568 set_hdr->__setno = htonl(set->setId); 569 set_hdr->__nmsgs = htonl(nmsgs); [all …]
|
/freebsd/sys/dev/dcons/ |
H A D | dcons.c | 148 buf->osize[port] = htonl(osize); in dcons_init_port() 149 buf->isize[port] = htonl(size - osize); in dcons_init_port() 150 buf->ooffset[port] = htonl(offset); in dcons_init_port() 151 buf->ioffset[port] = htonl(offset + osize); in dcons_init_port() 164 if (buf->version != htonl(DCONS_VERSION)) in dcons_load_buffer() 206 buf->version = htonl(DCONS_VERSION); in dcons_init()
|
/freebsd/libexec/talkd/ |
H A D | process.c | 64 rp->id_num = htonl(0); in process_request() 103 rp->id_num = htonl(ptr->id_num); in process_request() 112 rp->id_num = htonl(ptr->id_num); in process_request() 164 rp->id_num = htonl(ptr->id_num); in do_announce() 168 rp->id_num = htonl(ptr->id_num); in do_announce()
|
/freebsd/sys/dev/cxgbe/ |
H A D | offload.h | 39 (w)->wr_hi = htonl(V_FW_WR_OP(FW_ULPTX_WR) | V_FW_WR_ATOMIC(atomic)); \ 40 (w)->wr_mid = htonl(V_FW_WR_LEN16(DIV_ROUND_UP(wrlen, 16)) | \ 49 (w)->wr.wr_hi = htonl(V_FW_WR_OP(FW_TP_WR) | \ 51 (w)->wr.wr_mid = htonl(V_FW_WR_LEN16(DIV_ROUND_UP(sizeof(*w), 16)) | \ 58 OPCODE_TID(w) = htonl(MK_OPCODE_TID(cpl, tid)); \
|
/freebsd/sys/netpfil/ipfw/nat64/ |
H A D | nat64_translate.c | 324 if ((ia & htonl(0xff000000)) == htonl(0x0a000000) || in nat64_check_private_ip4() 325 (ia & htonl(0xfff00000)) == htonl(0xac100000) || in nat64_check_private_ip4() 326 (ia & htonl(0xffff0000)) == htonl(0xc0a80000)) in nat64_check_private_ip4() 336 if ((ia & htonl(0xffffff00)) == htonl(0xc0000000) || in nat64_check_private_ip4() 337 (ia & htonl(0xffffff00)) == htonl(0xc0586300) || in nat64_check_private_ip4() 338 (ia & htonl(0xfffffe00)) == htonl(0xc6120000) || in nat64_check_private_ip4() 339 (ia & htonl(0xffffff00)) == htonl(0xc0000200) || in nat64_check_private_ip4() 340 (ia & htonl(0xfffffe00)) == htonl(0xc6336400) || in nat64_check_private_ip4() 341 (ia & htonl(0xffffff00)) == htonl(0xcb007100)) in nat64_check_private_ip4() 416 (ip6->s6_addr32[2] & htonl(0xff00ffff)) != 0) in nat64_extract_ip4() [all …]
|
/freebsd/sys/contrib/openzfs/lib/libspl/include/os/linux/sys/ |
H A D | byteorder.h | 63 #define htonl(x) (x) macro 79 extern uint32_t htonl(uint32_t); 84 extern in_addr_t htonl(in_addr_t); 159 return ((((uint64_t)htonl(n)) << 32) + htonl(n >> 32));
|