| /freebsd/sys/net/ |
| H A D | bridgestp.c | 154 bstp_transmit(struct bstp_state *bs, struct bstp_port *bp) in bstp_transmit() argument 165 if (bp->bp_hello_timer.active == 0) { in bstp_transmit() 167 bstp_hello_timer_expiry(bs, bp); in bstp_transmit() 170 if (bp->bp_txcount > bs->bs_txholdcount) in bstp_transmit() 174 if (bp->bp_protover == BSTP_PROTO_RSTP) { in bstp_transmit() 175 bstp_transmit_bpdu(bs, bp); in bstp_transmit() 176 bp->bp_tc_ack = 0; in bstp_transmit() 178 switch (bp->bp_role) { in bstp_transmit() 180 bstp_transmit_bpdu(bs, bp); in bstp_transmit() 181 bp->bp_tc_ack = 0; in bstp_transmit() [all …]
|
| /freebsd/sys/geom/ |
| H A D | geom_io.c | 73 static int g_io_transient_map_bio(struct bio *bp); 130 struct bio *bp; in g_bioq_first() local 132 bp = TAILQ_FIRST(&bq->bio_queue); in g_bioq_first() 133 if (bp != NULL) { in g_bioq_first() 134 KASSERT((bp->bio_flags & BIO_ONQUEUE), in g_bioq_first() 135 ("Bio not on queue bp=%p target %p", bp, bq)); in g_bioq_first() 136 bp->bio_flags &= ~BIO_ONQUEUE; in g_bioq_first() 137 TAILQ_REMOVE(&bq->bio_queue, bp, bio_queue); in g_bioq_first() 140 return (bp); in g_bioq_first() 146 struct bio *bp; in g_new_bio() local [all …]
|
| /freebsd/sys/kern/ |
| H A D | vfs_bio.c | 171 static void vm_hold_free_pages(struct buf *bp, int newbsize); 172 static void vm_hold_load_pages(struct buf *bp, vm_offset_t from, 174 static void vfs_page_set_valid(struct buf *bp, vm_ooffset_t off, vm_page_t m); 175 static void vfs_page_set_validclean(struct buf *bp, vm_ooffset_t off, 177 static void vfs_clean_pages_dirty_buf(struct buf *bp); 178 static void vfs_setdirty_range(struct buf *bp); 179 static void vfs_vmio_invalidate(struct buf *bp); 180 static void vfs_vmio_truncate(struct buf *bp, int npages); 181 static void vfs_vmio_extend(struct buf *bp, int npages, int size); 197 static void bq_remove(struct bufqueue *bq, struct buf *bp); [all …]
|
| H A D | vfs_cluster.c | 93 struct buf *bp, *rbp, *reqbp; in cluster_read() local 121 error = getblkx(vp, lblkno, lblkno, size, 0, 0, gbflags, &bp); in cluster_read() 128 *bpp = reqbp = bp; in cluster_read() 135 if (bp->b_flags & B_CACHE) { in cluster_read() 138 } else if ((bp->b_flags & B_RAM) == 0) { in cluster_read() 141 bp->b_flags &= ~B_RAM; in cluster_read() 171 reqbp = bp = NULL; in cluster_read() 177 off_t firstread = bp->b_offset; in cluster_read() 181 KASSERT(bp->b_offset != NOOFFSET, in cluster_read() 225 bp = cluster_rbuild(vp, filesize, lblkno, in cluster_read() [all …]
|
| /freebsd/usr.sbin/ppp/ |
| H A D | mbuf.c | 78 m_length(struct mbuf *bp) in m_length() argument 82 for (len = 0; bp; bp = bp->m_next) in m_length() 83 len += bp->m_len; in m_length() 107 struct mbuf *bp; in m_get() local 126 bp = &(*mb)->u.m; in m_get() 145 bp = &(*mb)->u.m; in m_get() 153 memset(bp, '\0', sizeof(struct mbuf)); in m_get() 154 bp->m_size = size - sizeof *bp; in m_get() 155 bp->m_len = m_len; in m_get() 156 bp->m_type = type; in m_get() [all …]
|
| /freebsd/contrib/tcpdump/ |
| H A D | print-pim.c | 156 static void pimv2_print(netdissect_options *, const u_char *bp, u_int len, const u_char *); 160 const u_char *bp, u_int len) in pimv1_join_prune_print() argument 166 if (ND_TTEST_LEN(bp, 30) && GET_U_1(bp + 11) == 1 && in pimv1_join_prune_print() 167 ((njoin = GET_BE_U_2(bp + 20)) + GET_BE_U_2(bp + 22)) == 1) { in pimv1_join_prune_print() 170 ND_PRINT(" RPF %s ", GET_IPADDR_STRING(bp)); in pimv1_join_prune_print() 171 hold = GET_BE_U_2(bp + 6); in pimv1_join_prune_print() 177 GET_IPADDR_STRING(bp + 26), GET_U_1(bp + 25) & 0x3f, in pimv1_join_prune_print() 178 GET_IPADDR_STRING(bp + 12)); in pimv1_join_prune_print() 179 if (GET_BE_U_4(bp + 16) != 0xffffffff) in pimv1_join_prune_print() 180 ND_PRINT("/%s", GET_IPADDR_STRING(bp + 16)); in pimv1_join_prune_print() [all …]
|
| H A D | print-ptp.c | 290 static void ptp_print_2(netdissect_options *ndo, const u_char *bp, u_int len); 292 static void ptp_print_timestamp(netdissect_options *ndo, const u_char *bp, u_int *len, const char *… 293 static void ptp_print_timestamp_identity(netdissect_options *ndo, const u_char *bp, u_int *len, con… 294 static void ptp_print_announce_msg(netdissect_options *ndo, const u_char *bp, u_int *len); 295 static const u_char *ptp_print_port_id(netdissect_options *ndo, const u_char *bp, u_int *len); 296 static void ptp_print_mgmt_msg(netdissect_options *ndo, const u_char *bp, u_int *len); 300 const u_char *bp, u_int *len, uint8_t hex) in print_field() argument 309 u8_val = GET_U_1(bp); in print_field() 315 *len -= 1; bp += 1; in print_field() 318 u16_val = GET_BE_U_2(bp); in print_field() [all …]
|
| H A D | print-pgm.c | 145 const u_char *bp, u_int length, in pgm_print() argument 159 pgm = (const struct pgm_header *)bp; in pgm_print() 227 bp = (const u_char *) (spm + 1); in pgm_print() 231 ND_TCHECK_LEN(bp, sizeof(nd_ipv4)); in pgm_print() 232 addrtostr(bp, nla_buf, sizeof(nla_buf)); in pgm_print() 233 bp += sizeof(nd_ipv4); in pgm_print() 236 ND_TCHECK_LEN(bp, sizeof(nd_ipv6)); in pgm_print() 237 addrtostr6(bp, nla_buf, sizeof(nla_buf)); in pgm_print() 238 bp += sizeof(nd_ipv6); in pgm_print() 259 bp = (const u_char *) (pgm_poll + 1); in pgm_print() [all …]
|
| H A D | print-gre.c | 77 gre_print(netdissect_options *ndo, const u_char *bp, u_int length) in gre_print() argument 82 ND_TCHECK_2(bp); in gre_print() 85 vers = GET_BE_U_2(bp) & GRE_VERS_MASK; in gre_print() 90 gre_print_0(ndo, bp, len); in gre_print() 93 gre_print_1(ndo, bp, len); in gre_print() 106 gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length) in gre_print_0() argument 112 flags = GET_BE_U_2(bp); in gre_print_0() 118 bp += 2; in gre_print_0() 120 ND_TCHECK_2(bp); in gre_print_0() 123 prot = GET_BE_U_2(bp); in gre_print_0() [all …]
|
| H A D | print-dvmrp.c | 77 const u_char *bp, u_int len) in dvmrp_print() argument 88 type = GET_U_1(bp + 1); in dvmrp_print() 91 bp += 8; in dvmrp_print() 99 print_probe(ndo, bp, len); in dvmrp_print() 105 print_report(ndo, bp, len); in dvmrp_print() 110 print_neighbors(ndo, bp, len); in dvmrp_print() 117 bp -= 4; in dvmrp_print() 118 major_version = GET_U_1(bp + 3); in dvmrp_print() 119 minor_version = GET_U_1(bp + 2); in dvmrp_print() 120 bp += 4; in dvmrp_print() [all …]
|
| H A D | print-bootp.c | 285 const struct bootp *bp; in bootp_print() local 291 bp = (const struct bootp *)cp; in bootp_print() 292 bp_op = GET_U_1(bp->bp_op); in bootp_print() 296 bp_htype = GET_U_1(bp->bp_htype); in bootp_print() 297 bp_hlen = GET_U_1(bp->bp_hlen); in bootp_print() 299 ND_PRINT(" from %s", GET_ETHERADDR_STRING(bp->bp_chaddr)); in bootp_print() 307 ND_TCHECK_2(bp->bp_secs); in bootp_print() 318 if (GET_U_1(bp->bp_hops)) in bootp_print() 319 ND_PRINT(", hops %u", GET_U_1(bp->bp_hops)); in bootp_print() 320 if (GET_BE_U_4(bp->bp_xid)) in bootp_print() [all …]
|
| /freebsd/libexec/bootpd/tools/bootptest/ |
| H A D | print-bootp.c | 45 static void rfc1048_print(u_char *bp, int length); 46 static void cmu_print(u_char *bp, int length); 47 static void other_print(u_char *bp, int length); 48 static void dump_hex(u_char *bp, int len); 54 bootp_print(struct bootp *bp, int length, u_short sport, u_short dport) in bootp_print() argument 71 switch (bp->bp_op) { in bootp_print() 86 printf(" bootp-#%d", bp->bp_op); in bootp_print() 90 if (bp->bp_htype != 1) in bootp_print() 91 printf(" htype:%d", bp->bp_htype); in bootp_print() 94 if (bp->bp_hlen != 6) in bootp_print() [all …]
|
| /freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/ |
| H A D | dt_buf.c | 49 dt_buf_create(dtrace_hdl_t *dtp, dt_buf_t *bp, const char *name, size_t len) in dt_buf_create() argument 54 bp->dbu_buf = bp->dbu_ptr = dt_zalloc(dtp, len); in dt_buf_create() 55 bp->dbu_len = len; in dt_buf_create() 57 if (bp->dbu_buf == NULL) in dt_buf_create() 58 bp->dbu_err = dtrace_errno(dtp); in dt_buf_create() 60 bp->dbu_err = 0; in dt_buf_create() 62 bp->dbu_resizes = 0; in dt_buf_create() 63 bp->dbu_name = name; in dt_buf_create() 67 dt_buf_destroy(dtrace_hdl_t *dtp, dt_buf_t *bp) in dt_buf_destroy() argument 70 bp->dbu_name, (ulong_t)bp->dbu_len, bp->dbu_resizes); in dt_buf_destroy() [all …]
|
| /freebsd/crypto/krb5/src/plugins/kdb/db2/libdb2/mpool/ |
| H A D | mpool.c | 112 BKT *bp; in mpool_new() local 126 if ((bp = mpool_bkt(mp)) == NULL) in mpool_new() 130 bp->pgno = *pgnoaddr; in mpool_new() 132 bp->pgno = *pgnoaddr = mp->npages++; in mpool_new() 134 bp->flags = MPOOL_PINNED | MPOOL_INUSE; in mpool_new() 136 head = &mp->hqh[HASHKEY(bp->pgno)]; in mpool_new() 137 TAILQ_INSERT_HEAD(head, bp, hq); in mpool_new() 138 TAILQ_INSERT_TAIL(&mp->lqh, bp, q); in mpool_new() 139 return (bp->page); in mpool_new() 146 BKT *bp; in mpool_delete() local [all …]
|
| /freebsd/contrib/mandoc/ |
| H A D | eqn_term.c | 44 term_eqn(struct termp *p, const struct eqn_box *bp) in term_eqn() argument 47 eqn_box(p, bp); in term_eqn() 52 eqn_box(struct termp *p, const struct eqn_box *bp) in eqn_box() argument 60 if ((bp->type == EQN_LIST && bp->expectargs > 1) || in eqn_box() 61 (bp->type == EQN_PILE && (bp->prev || bp->next)) || in eqn_box() 62 (bp->parent != NULL && (bp->parent->pos == EQNPOS_SQRT || in eqn_box() 64 ((bp->top != NULL || bp->bottom != NULL) && in eqn_box() 65 bp->parent->type == EQN_SUBEXPR && in eqn_box() 66 bp->parent->pos != EQNPOS_OVER && bp->next != NULL) || in eqn_box() 68 (bp->type == EQN_SUBEXPR && bp->pos != EQNPOS_SQRT && in eqn_box() [all …]
|
| /freebsd/lib/libc/db/mpool/ |
| H A D | mpool.c | 112 BKT *bp; in mpool_new() local 126 if ((bp = mpool_bkt(mp)) == NULL) in mpool_new() 130 bp->pgno = *pgnoaddr; in mpool_new() 132 bp->pgno = *pgnoaddr = mp->npages++; in mpool_new() 134 bp->flags = MPOOL_PINNED | MPOOL_INUSE; in mpool_new() 136 head = &mp->hqh[HASHKEY(bp->pgno)]; in mpool_new() 137 TAILQ_INSERT_HEAD(head, bp, hq); in mpool_new() 138 TAILQ_INSERT_TAIL(&mp->lqh, bp, q); in mpool_new() 139 return (bp->page); in mpool_new() 146 BKT *bp; in mpool_delete() local [all …]
|
| /freebsd/lib/libc/db/hash/ |
| H A D | hash_buf.c | 106 BUFHEAD *bp; in __get_buf() 111 bp = prev_bp->ovfl; in __get_buf() 112 if (!bp || (bp->addr != addr)) in __get_buf() 113 bp = NULL; in __get_buf() 133 bp = PTROF(segp[segment_ndx]); in __get_buf() 138 if (!bp) { in __get_buf() 139 bp = newbuf(hashp, addr, prev_bp); in __get_buf() 140 if (!bp || in __get_buf() 141 __get_page(hashp, bp in __get_buf() 103 BUFHEAD *bp; __get_buf() local 154 BUFHEAD *bp; /* The buffer we're going to use */ newbuf() local 318 BUFHEAD *bp; __buf_free() local 347 __reclaim_buf(HTAB * hashp,BUFHEAD * bp) __reclaim_buf() argument [all...] |
| /freebsd/usr.sbin/bsnmpd/modules/snmp_bridge/ |
| H A D | bridge_port.c | 62 struct bridge_port *bp; in bridge_ports_free() local 64 while ((bp = TAILQ_FIRST(headp)) != NULL) { in bridge_ports_free() 65 TAILQ_REMOVE(headp, bp, b_p); in bridge_ports_free() 66 free(bp); in bridge_ports_free() 78 struct bridge_port *bp; in bridge_port_memif_free() local 81 bp = TAILQ_NEXT(bif->f_bp, b_p); in bridge_port_memif_free() 84 bif->f_bp = bp; in bridge_port_memif_free() 95 struct bridge_port *bp, struct bridge_port **f_bp) in bridge_port_insert_at() argument 102 t1 != NULL && bp->sysindex == t1->sysindex; in bridge_port_insert_at() 104 if (bp->if_idx < t1->if_idx) { in bridge_port_insert_at() [all …]
|
| /freebsd/sys/geom/eli/ |
| H A D | g_eli_privacy.c | 65 g_eli_bio_copyin(struct bio *bp, void *kaddr) in g_eli_bio_copyin() argument 71 iov[0].iov_len = bp->bio_length; in g_eli_bio_copyin() 75 uio.uio_resid = bp->bio_length; in g_eli_bio_copyin() 78 uiomove_fromphys(bp->bio_ma, bp->bio_ma_offset, bp->bio_length, &uio); in g_eli_bio_copyin() 90 struct bio *bp; in g_eli_crypto_read_done() local 96 bp = (struct bio *)crp->crp_opaque; in g_eli_crypto_read_done() 97 bp->bio_inbed++; in g_eli_crypto_read_done() 100 bp->bio_inbed, bp->bio_children); in g_eli_crypto_read_done() 101 bp->bio_completed += crp->crp_payload_length; in g_eli_crypto_read_done() 104 bp->bio_inbed, bp->bio_children, crp->crp_etype); in g_eli_crypto_read_done() [all …]
|
| H A D | g_eli_integrity.c | 129 struct bio *bp; in g_eli_auth_read_done() local 135 bp = (struct bio *)crp->crp_opaque; in g_eli_auth_read_done() 136 bp->bio_inbed++; in g_eli_auth_read_done() 137 sc = bp->bio_to->geom->softc; in g_eli_auth_read_done() 139 bp->bio_completed += crp->crp_payload_length; in g_eli_auth_read_done() 141 bp->bio_inbed, bp->bio_children, crp->crp_payload_length, (intmax_t)bp->bio_completed); in g_eli_auth_read_done() 147 decr_secsize = bp->bio_to->sectorsize; in g_eli_auth_read_done() 152 nsec = bp->bio_length / decr_secsize; in g_eli_auth_read_done() 157 (char *)bp->bio_driver2) / encr_secsize; in g_eli_auth_read_done() 159 errorp = (int *)((char *)bp->bio_driver2 + encr_secsize * nsec + in g_eli_auth_read_done() [all …]
|
| /freebsd/sys/contrib/openzfs/include/sys/ |
| H A D | spa.h | 87 * overhead, three DVAs per bp, plus one more bit in case we do anything 176 * fill count number of non-zero blocks under this bp 177 * checksum[4] 256-bit checksum of the data this bp describes 225 * fill count number of non-zero blocks under this bp (truncated to 32 bits) 227 * checksum[2] 128-bit checksum of the data this bp describes 234 * BP_IS_AUTHENTICATED()). Otherwise (if level > 0), this bp will use the MAC 306 * bp's they are stored in units of SPA_MINBLOCKSHIFT. 317 #define BPE_GET_ETYPE(bp) \ argument 318 (ASSERT(BP_IS_EMBEDDED(bp)), \ 319 BF64_GET((bp) 320 BPE_SET_ETYPE(bp,t) global() argument 325 BPE_GET_LSIZE(bp) global() argument 328 BPE_SET_LSIZE(bp,x) global() argument 333 BPE_GET_PSIZE(bp) global() argument 336 BPE_SET_PSIZE(bp,x) global() argument 350 BPE_IS_PAYLOADWORD(bp,wp) global() argument 403 BP_GET_LSIZE(bp) global() argument 407 BP_SET_LSIZE(bp,x) global() argument 413 BP_GET_PSIZE(bp) global() argument 416 BP_SET_PSIZE(bp,x) global() argument 422 BP_GET_COMPRESS(bp) global() argument 424 BP_SET_COMPRESS(bp,x) global() argument 427 BP_IS_EMBEDDED(bp) global() argument 428 BP_SET_EMBEDDED(bp,x) global() argument 430 BP_GET_CHECKSUM(bp) global() argument 433 BP_SET_CHECKSUM(bp,x) global() argument 438 BP_GET_TYPE(bp) global() argument 439 BP_SET_TYPE(bp,x) global() argument 441 BP_GET_LEVEL(bp) global() argument 442 BP_SET_LEVEL(bp,x) global() argument 445 BP_USES_CRYPT(bp) global() argument 446 BP_SET_CRYPT(bp,x) global() argument 448 BP_IS_ENCRYPTED(bp) global() argument 453 BP_IS_AUTHENTICATED(bp) global() argument 458 BP_HAS_INDIRECT_MAC_CKSUM(bp) global() argument 461 BP_IS_PROTECTED(bp) global() argument 464 BP_GET_DEDUP(bp) global() argument 465 BP_SET_DEDUP(bp,x) global() argument 467 BP_GET_BYTEORDER(bp) global() argument 468 BP_SET_BYTEORDER(bp,x) global() argument 470 BP_GET_FREE(bp) global() argument 471 BP_SET_FREE(bp,x) global() argument 486 BP_GET_LOGICAL_BIRTH(bp) global() argument 487 BP_SET_LOGICAL_BIRTH(bp,x) global() argument 489 BP_GET_RAW_PHYSICAL_BIRTH(bp) global() argument 490 BP_SET_PHYSICAL_BIRTH(bp,x) global() argument 492 BP_GET_PHYSICAL_BIRTH(bp) global() argument 497 BP_GET_BIRTH(bp) global() argument 501 BP_SET_BIRTH(bp,logical,physical) global() argument 509 BP_GET_FILL(bp) global() argument 514 BP_SET_FILL(bp,fill) global() argument 523 BP_GET_IV2(bp) global() argument 526 BP_SET_IV2(bp,iv2) global() argument 532 BP_GET_REWRITE(bp) global() argument 535 BP_SET_REWRITE(bp,x) global() argument 541 BP_IS_METADATA(bp) global() argument 544 BP_GET_ASIZE(bp) global() argument 550 BP_GET_UCSIZE(bp) global() argument 553 BP_GET_NDVAS(bp) global() argument 559 BP_COUNT_GANG(bp) global() argument 579 BP_IDENTITY(bp) global() argument 580 BP_IS_GANG(bp) global() argument 584 BP_IS_HOLE(bp) global() argument 587 BP_SET_REDACTED(bp) global() argument 592 BP_IS_REDACTED(bp) global() argument 596 BP_IS_RAIDZ(bp) global() argument 599 BP_ZERO_DVAS(bp) global() argument 609 BP_ZERO(bp) global() argument 627 BP_SHOULD_BYTESWAP(bp) global() argument 637 SNPRINTF_BLKPTR(func,ws,buf,size,bp,type,checksum,compress) global() argument 732 BP_GET_BUFC_TYPE(bp) global() argument 1290 dprintf_bp(bp,fmt,...) global() argument 1299 dprintf_bp(bp,fmt,...) global() argument [all...] |
| /freebsd/sys/sys/ |
| H A D | buf.h | 300 #define BUF_LOCKINIT(bp, wmesg) \ argument 301 lockinit(&(bp)->b_lock, PVFS, wmesg, 0, LK_NEW) 306 #define BUF_LOCK(bp, locktype, interlock) \ argument 307 _lockmgr_args_rw(&(bp)->b_lock, (locktype), (interlock), \ 314 #define BUF_TIMELOCK(bp, locktype, interlock, wmesg, catch, timo) \ argument 315 _lockmgr_args_rw(&(bp)->b_lock, (locktype) | LK_TIMELOCK, \ 323 #define BUF_UNLOCK(bp) do { \ argument 324 KASSERT(((bp)->b_flags & B_REMFREE) == 0 || BUF_LOCKRECURSED(bp), \ 325 ("BUF_UNLOCK %p while B_REMFREE is still set.", (bp))); \ 327 BUF_UNLOCK_RAW((bp)); \ [all …]
|
| /freebsd/contrib/byacc/ |
| H A D | symtab.c | 32 bucket *bp; in make_bucket() local 36 bp = TMALLOC(bucket, 1); in make_bucket() 37 NO_SPACE(bp); in make_bucket() 39 bp->link = 0; in make_bucket() 40 bp->next = 0; in make_bucket() 42 bp->name = TMALLOC(char, strlen(name) + 1); in make_bucket() 43 NO_SPACE(bp->name); in make_bucket() 45 bp->tag = 0; in make_bucket() 46 bp->value = UNDEFINED; in make_bucket() 47 bp->index = 0; in make_bucket() [all …]
|
| /freebsd/usr.sbin/rtadvd/ |
| H A D | advcap.c | 103 tgetent(char *bp, char *name) in tgetent() argument 105 return (getent(bp, name, conffile)); in tgetent() 109 getent(char *bp, char *name, const char *cfile) in getent() argument 117 tbuf = bp; in getent() 135 cp = bp; in getent() 147 if (cp > bp && cp[-1] == '\\') { in getent() 153 if (cp >= bp + BUFSIZ - 1) { in getent() 255 tskip(char *bp) in tskip() argument 260 while (*bp) { in tskip() 261 switch (*bp) { in tskip() [all …]
|
| /freebsd/usr.sbin/makefs/ffs/ |
| H A D | buf.c | 93 brelse(struct m_buf *bp) in brelse() argument 96 assert (bp != NULL); in brelse() 97 assert (bp->b_data != NULL); in brelse() 99 if (bp->b_lblkno < 0) { in brelse() 113 bp->b_bcount = 0; in brelse() 117 TAILQ_REMOVE(&buftail, bp, b_tailq); in brelse() 118 free(bp->b_data); in brelse() 119 free(bp); in brelse() 123 bwrite(struct m_buf *bp) in bwrite() argument 129 fsinfo_t *fs = bp->b_fs; in bwrite() [all …]
|