Home
last modified time | relevance | path

Searched +full:pkt +full:- +full:size (Results 1 – 25 of 404) sorted by relevance

12345678910>>...17

/freebsd/usr.sbin/bluetooth/btpand/
H A Dbnep.c3 /*-
4 * SPDX-License-Identifier: BSD-2-Clause
87 bnep_recv(packet_t *pkt) in bnep_recv() argument
92 if (pkt->len < 1) in bnep_recv()
95 type = pkt->ptr[0]; in bnep_recv()
96 packet_adj(pkt, 1); in bnep_recv()
100 if (pkt->len < (ETHER_ADDR_LEN * 2) + ETHER_TYPE_LEN) { in bnep_recv()
105 pkt->dst = pkt->ptr; in bnep_recv()
106 packet_adj(pkt, ETHER_ADDR_LEN); in bnep_recv()
107 pkt->src = pkt->ptr; in bnep_recv()
[all …]
H A Dpacket.c3 /*-
4 * SPDX-License-Identifier: BSD-2-Clause
40 packet_t *pkt; in packet_alloc() local
42 pkt = malloc(sizeof(packet_t) + chan->mru); in packet_alloc()
43 if (pkt == NULL) { in packet_alloc()
48 memset(pkt, 0, sizeof(packet_t)); in packet_alloc()
49 STAILQ_INIT(&pkt->extlist); in packet_alloc()
50 pkt->ptr = pkt->buf; in packet_alloc()
52 pkt->chan = chan; in packet_alloc()
53 chan->refcnt++; in packet_alloc()
[all …]
/freebsd/sys/dev/xen/netback/
H A Dnetback_unit_tests.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2009-2011 Spectra Logic Corporation
53 buflen -= MIN(buflen, new_chars); \
106 static int xnb_get1pkt(struct xnb_pkt *pkt, size_t size, uint16_t flags);
228 buflen -= new_chars; in xnb_unit_test_runner()
237 n_passes = ntests - n_failures; in xnb_unit_test_runner()
393 struct xnb_pkt pkt; in xnb_ring2pkt_emptyring() local
396 num_consumed = xnb_ring2pkt(&pkt, &xnb_unit_pvt.txb, in xnb_ring2pkt_emptyring()
407 struct xnb_pkt pkt; in xnb_ring2pkt_1req() local
[all …]
H A Dnetback.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2009-2011 Spectra Logic Corporation
80 #include <xen/xen-os.h>
86 /*--------------------------- Compile-time Tunables --------------------------*/
88 /*---------------------------------- Macros ----------------------------------*/
94 #define XNB_SG 1 /* netback driver supports feature-sg */
95 #define XNB_GSO_TCPV4 0 /* netback driver supports feature-gso-tcpv4 */
96 #define XNB_RX_COPY 1 /* netback driver supports feature-rx-copy */
97 #define XNB_RX_FLIP 0 /* netback driver does not support feature-rx-flip */
[all …]
/freebsd/contrib/unbound/util/data/
H A Dmsgparse.c2 * util/data/msgparse.c - parse wireformat DNS messages.
58 smart_compare(sldns_buffer* pkt, uint8_t* dnow, in smart_compare() argument
65 >= sldns_buffer_limit(pkt)) in smart_compare()
66 return -1; in smart_compare()
67 p = sldns_buffer_at(pkt, PTR_OFFSET(dnow[0], dnow[1])); in smart_compare()
75 return dname_pkt_compare(pkt, dnow, dprlast); in smart_compare()
89 p->rrset_bucket_next = msg->hashtable[hash & (PARSE_TABLE_SIZE-1)]; in new_rrset()
90 msg->hashtable[hash & (PARSE_TABLE_SIZE-1)] = p; in new_rrset()
91 p->rrset_all_next = 0; in new_rrset()
92 if(msg->rrset_last) in new_rrset()
[all …]
H A Dmsgencode.h2 * util/data/msgencode.h - encode compressed DNS messages.
62 * @param udpsize: size of the answer, 512, from EDNS, or 64k for TCP.
86 * @param udpsize: size of the answer, 512, from EDNS, or 64k for TCP.
99 * @param pkt: where to store the packet.
102 void qinfo_query_encode(struct sldns_buffer* pkt, struct query_info* qinfo);
105 * Estimate size of EDNS record in packet. EDNS record will be no larger.
112 * Calculate the size of a specific EDNS option in packet.
114 * @param code: the opt code to get the size of.
120 * Calculate the size of the EDE option(s) in packet. Also calculate separately
121 * the size of the EXTRA-TEXT field(s) in case we can trim them to fit.
[all …]
/freebsd/libexec/tftpd/
H A Dtftp-io.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
46 #include "tftp-file.h"
47 #include "tftp-io.h"
48 #include "tftp-utils.h"
49 #include "tftp-options.h"
54 static int send_packet(int peer, uint16_t block, char *pkt, int size);
69 { -1, NULL }
93 for (pe = errmsgs; pe->e_code >= 0; pe++) in errtomsg()
94 if (pe->e_code == error) in errtomsg()
[all …]
/freebsd/crypto/openssl/test/
H A Dwpackettest.c2 * Copyright 2016-2025 The OpenSSL Project Authors. All Rights Reserved.
31 /* QUIC sub-packet with 4-byte length prefix, containing a 1-byte vlint */
33 /* QUIC sub-packet with 1-byte length prefix, containing a 1-byte vlint */
35 /* QUIC sub-packet with 2-byte length prefix, containing a 2-byte vlint */
37 /* QUIC sub-packet with 8-byte length prefix, containing a 4-byte vlint */
42 /* QUIC sub-packet with 8-byte length prefix, containing a 8-byte vlint */
47 /* QUIC sub-packet, length known up-front */
49 /* Nested and sequential sub-packets with length prefixes */
59 static int cleanup(WPACKET *pkt) in cleanup() argument
61 WPACKET_cleanup(pkt); in cleanup()
[all …]
H A Dquic_cc_test.c2 * Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
47 * responsible for querying the congestion controller and choosing the size of
80 /* Size of simulated packet in bytes. */
81 size_t size; member
91 return ossl_time_compare(a->next_time, b->next_time); in net_pkt_cmp()
111 s->ccm = ccm; in net_sim_init()
112 s->cc = cc; in net_sim_init()
114 s->capacity = capacity; in net_sim_init()
115 s->latency = latency; in net_sim_init()
117 s->spare_capacity = capacity; in net_sim_init()
[all …]
/freebsd/sys/contrib/dev/iwlwifi/mld/
H A Dnotif.c1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
3 * Copyright (C) 2024-2025 Intel Corporation
11 #include "iwl-trans.h"
15 #include "fw/api/mac-cfg.h"
16 #include "session-protect.h"
17 #include "fw/api/time-event.h"
37 #include "ftm-initiator.h"
41 { .size = sizeof(struct _struct), .ver = _ver },
70 struct iwl_rx_packet *pkt, \
73 const struct notif_struct *notif = (const void *)pkt->data; \
[all …]
/freebsd/contrib/unbound/iterator/
H A Diter_scrub.c2 * iterator/iter_scrub.c - scrubbing, normalization, sanitization of DNS msgs.
63 remove_rrset(const char* str, sldns_buffer* pkt, struct msg_parse* msg, in remove_rrset() argument
67 && (*rrset)->dname_len <= LDNS_MAX_DOMAINLEN) { in remove_rrset()
69 dname_pkt_copy(pkt, buf, (*rrset)->dname); in remove_rrset()
71 (*rrset)->type, ntohs((*rrset)->rrset_class)); in remove_rrset()
74 prev->rrset_all_next = (*rrset)->rrset_all_next; in remove_rrset()
75 else msg->rrset_first = (*rrset)->rrset_all_next; in remove_rrset()
76 if(msg->rrset_last == *rrset) in remove_rrset()
77 msg->rrset_last = prev; in remove_rrset()
78 msg->rrset_count --; in remove_rrset()
[all …]
/freebsd/crypto/openssl/crypto/
H A Dpacket.c2 * Copyright 2015-2023 The OpenSSL Project Authors. All Rights Reserved.
19 int WPACKET_allocate_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes) in WPACKET_allocate_bytes() argument
21 if (!WPACKET_reserve_bytes(pkt, len, allocbytes)) in WPACKET_allocate_bytes()
24 pkt->written += len; in WPACKET_allocate_bytes()
25 pkt->curr += len; in WPACKET_allocate_bytes()
29 int WPACKET_sub_allocate_bytes__(WPACKET *pkt, size_t len, in WPACKET_sub_allocate_bytes__() argument
32 if (!WPACKET_start_sub_packet_len__(pkt, lenbytes) in WPACKET_sub_allocate_bytes__()
33 || !WPACKET_allocate_bytes(pkt, len, allocbytes) in WPACKET_sub_allocate_bytes__()
34 || !WPACKET_close(pkt)) in WPACKET_sub_allocate_bytes__()
40 #define GETBUF(p) (((p)->staticbuf != NULL) \
[all …]
H A Dder_writer.c16 static int int_start_context(WPACKET *pkt, int tag) in int_start_context() argument
22 return WPACKET_start_sub_packet(pkt); in int_start_context()
25 static int int_end_context(WPACKET *pkt, int tag) in int_end_context() argument
29 * sub-packet and this sub-packet has nothing written to it, the DER length in int_end_context()
30 * will not be written, and the total written size will be unchanged before in int_end_context()
45 return WPACKET_get_total_written(pkt, &size1) in int_end_context()
46 && WPACKET_close(pkt) in int_end_context()
47 && WPACKET_get_total_written(pkt, &size2) in int_end_context()
48 && (size1 == size2 || WPACKET_put_bytes_u8(pkt, tag)); in int_end_context()
51 int ossl_DER_w_precompiled(WPACKET *pkt, int tag, in ossl_DER_w_precompiled() argument
[all …]
/freebsd/crypto/openssl/include/internal/
H A Dpacket_quic.h2 * Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
19 * Decodes a QUIC variable-length integer in |pkt| and stores the result in
22 __owur static ossl_inline int PACKET_get_quic_vlint(PACKET *pkt, in PACKET_get_quic_vlint() argument
27 if (PACKET_remaining(pkt) < 1) in PACKET_get_quic_vlint()
30 enclen = ossl_quic_vlint_decode_len(*pkt->curr); in PACKET_get_quic_vlint()
32 if (PACKET_remaining(pkt) < enclen) in PACKET_get_quic_vlint()
35 *data = ossl_quic_vlint_decode_unchecked(pkt->curr); in PACKET_get_quic_vlint()
36 packet_forward(pkt, enclen); in PACKET_get_quic_vlint()
41 * Decodes a QUIC variable-length integer in |pkt| and stores the result in
43 * position. If was_minimal is non-NULL, *was_minimal is set to 1 if the integer
[all …]
H A Dpacket.h2 * Copyright 2015-2024 The OpenSSL Project Authors. All Rights Reserved.
30 static ossl_inline void packet_forward(PACKET *pkt, size_t len) in packet_forward() argument
32 pkt->curr += len; in packet_forward()
33 pkt->remaining -= len; in packet_forward()
39 static ossl_inline size_t PACKET_remaining(const PACKET *pkt) in PACKET_remaining() argument
41 return pkt->remaining; in PACKET_remaining()
46 * Useful for integrating with non-PACKET parsing code.
50 static ossl_inline const unsigned char *PACKET_end(const PACKET *pkt) in PACKET_end() argument
52 return pkt->curr + pkt->remaining; in PACKET_end()
57 * For use in non-PACKETized APIs.
[all …]
/freebsd/contrib/ldns/
H A Dpacket.c8 * (c) NLnet Labs, 2004-2006
43 return packet->_header->_id; in ldns_pkt_id()
49 return packet->_header->_qr; in ldns_pkt_qr()
55 return packet->_header->_aa; in ldns_pkt_aa()
61 return packet->_header->_tc; in ldns_pkt_tc()
67 return packet->_header->_rd; in ldns_pkt_rd()
73 return packet->_header->_cd; in ldns_pkt_cd()
79 return packet->_header->_ra; in ldns_pkt_ra()
85 return packet->_header->_ad; in ldns_pkt_ad()
91 return packet->_header->_opcode; in ldns_pkt_get_opcode()
[all …]
/freebsd/tools/tools/netmap/
H A Dpkt-gen.c2 * Copyright (C) 2011-2014 Matteo Landi, Luigi Rizzo. All rights reserved.
3 * Copyright (C) 2013-2015 Universita` di Pisa. All rights reserved.
28 * $Id: pkt-gen.c 12346 2013-06-12 17:36:25Z luigi $
133 n->octet[0], n->octet[1], n->octet[2], in ether_ntoa()
134 n->octet[3], n->octet[4], n->octet[5]); in ether_ntoa()
184 static const char *default_payload = "netmap pkt-gen DIRECT payload\n"
187 static const char *indirect_payload = "netmap pkt-gen indirect payload\n"
193 #define VIRT_HDR_1 10 /* length of a base vnet-hdr */
194 #define VIRT_HDR_2 12 /* length of the extenede vnet-hdr */
202 struct pkt { struct
[all …]
/freebsd/stand/libsa/
H A Dnfs.c3 /*-
89 * For NFSv3, the file handle is variable in size, so most fixed sized
91 * that starts with any fixed size section is followed by an array
92 * that covers the maximum size required.
125 static int nfs_read(struct open_file *f, void *buf, size_t size, size_t *resid);
185 void *pkt = NULL; in nfs_getrootfh() local
213 if (len > sizeof(args->path)) in nfs_getrootfh()
214 len = sizeof(args->path); in nfs_getrootfh()
215 args->len = htonl(len); in nfs_getrootfh()
216 bcopy(path, args->path, len); in nfs_getrootfh()
[all …]
/freebsd/contrib/processor-trace/libipt/src/
H A Dpt_packet_decoder.c2 * Copyright (c) 2014-2019, Intel Corporation
47 return -pte_invalid; in pt_pkt_decoder_init()
51 errcode = pt_config_from_user(&decoder->config, config); in pt_pkt_decoder_init()
96 return -pte_invalid; in pt_pkt_sync_forward()
98 begin = decoder->config.begin; in pt_pkt_sync_forward()
99 sync = decoder->sync; in pt_pkt_sync_forward()
100 pos = decoder->pos; in pt_pkt_sync_forward()
108 return -pte_internal; in pt_pkt_sync_forward()
113 space = pos - begin; in pt_pkt_sync_forward()
115 space = ptps_psb - 1; in pt_pkt_sync_forward()
[all …]
/freebsd/sys/dev/wg/
H A Dif_wg.c1 /* SPDX-License-Identifier: ISC
3 * Copyright (C) 2015-2021 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
4 * Copyright (C) 2019-2021 Matt Dunwoodie <ncon@noconroy.net>
5 * Copyright (c) 2019-2020 Rubicon Communications, LLC (Netgate)
56 #define DEFAULT_MTU (ETHERMTU - 80)
57 #define MAX_MTU (IF_MAXMTU - 80)
61 #define MAX_QUEUED_PKT_MASK (MAX_QUEUED_PKT - 1)
70 #define DPRINTF(sc, ...) if (if_getflags(sc->sc_ifp) & IFF_DEBUG) if_printf(sc->sc_ifp, ##__VA_ARGS…
256 gtaskqueue_drain((gtask)->gt_taskqueue, &(gtask)->gt_task)
390 sx_assert(&sc->sc_lock, SX_XLOCKED); in wg_peer_create()
[all …]
/freebsd/crypto/krb5/src/lib/krad/
H A Dpacket.c1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* lib/krad/packet.c - Packet functions for libkrad */
45 #define AUTH_FIELD_SIZE (OFFSET_ATTR - OFFSET_AUTH)
47 #define offset(d, o) (&(d)->data[o])
48 #define pkt_code_get(p) (*(krad_code *)offset(&(p)->pkt, OFFSET_CODE))
49 #define pkt_code_set(p, v) (*(krad_code *)offset(&(p)->pkt, OFFSET_CODE)) = v
50 #define pkt_id_get(p) (*(uchar *)offset(&(p)->pkt, OFFSET_ID))
51 #define pkt_id_set(p, v) (*(uchar *)offset(&(p)->pkt, OFFSET_ID)) = v
52 #define pkt_len_get(p) load_16_be(offset(&(p)->pkt, OFFSET_LENGTH))
53 #define pkt_len_set(p, v) store_16_be(v, offset(&(p)->pkt, OFFSET_LENGTH))
[all …]
/freebsd/tests/sys/netpfil/pf/
H A Dmax_pkt_size.sh2 # SPDX-License-Identifier: BSD-2-Clause
38 jexec alcatraz pfctl -e
44 atf_check -s exit:0 -o ignore \
45 ping -c 1 192.0.2.1
46 atf_check -s exit:0 -o ignore \
47 ping -c 1 -s 100 192.0.2.1
50 atf_check -s exit:2 -o ignore \
51 ping -c 3 -s 101 192.0.2.1
52 atf_check -s exit:2 -o ignore \
53 ping -c 3 -s 128 192.0.2.1
[all …]
/freebsd/sys/dev/hyperv/pcib/
H A Dvmbus_pcib.c1 /*-
2 * Copyright (c) 2016-2017 Microsoft Corp.
93 mtx_init(&c->lock, "hvcmpl", NULL, MTX_DEF); in init_completion()
94 c->done = 0; in init_completion()
99 c->done = 0; in reinit_completion()
104 mtx_destroy(&c->lock); in free_completion()
110 mtx_lock(&c->lock); in complete()
111 c->done++; in complete()
112 mtx_unlock(&c->lock); in complete()
119 mtx_lock(&c->lock); in wait_for_completion()
[all …]
/freebsd/contrib/lib9p/pytest/
H A Dp9conn.py4 handle plan9 server <-> client connections
35 # namedtuple so that we can create instances with all-None
38 'ino mode uid gid nlink rdev size blksize blocks '
53 from the Rerror reply, or from converting the errno in a dot-L
54 or dot-u Rerror reply. The error number may be None if the
56 None or empty string if a non-None errno supplies the error
74 if self.errno: # check for "is not None", or just non-false-y?
117 self.max_payload = 2**32 - self.size_coder.size
125 "suggest a max I/O size, for when self.maxio is 0 / unset"
129 "return a minimum size below which we refuse to work"
[all …]
H A Dprotocol.py6 The sub-namespace td has type definitions (qid, stat) and values
24 dotu-specific members (used only when packing for dotu/dotl and
47 wirestat objects, which are basically size-counted pre-sequenced
48 stat objects. The pre-sequencing uses:
68 The sub-namespace rrd has request (Tversion, Topen, etc) and
101 course are the pre-filled fields in a Tversion PFOD instance).
104 >>> pkt = dotu.pack(fcall='Tversion', args=args)
105 >>> len(pkt)
111 size[4] fcall[1] tag[2] msize[4] version[s]
113 which corresponds to a struct's IBHIH (for the fixed size parts)
[all …]

12345678910>>...17