Home
last modified time | relevance | path

Searched refs:mbc (Results 1 – 25 of 28) sorted by relevance

12

/illumos-gate/usr/src/cmd/smbsrv/test-msgbuf/
H A Dtest_mbmarshal.c45 mbuf_chain_t *mbc; in mbm_put_a0() local
70 smb_mbc_free(mbc); in mbm_put_a0()
572 m = mbc.chain; in mbm_put_mbuf3()
614 bzero(&mbc, sizeof (mbc)); in mbm_get_a0()
653 bzero(&mbc, sizeof (mbc)); in mbm_get_a1()
689 bzero(&mbc, sizeof (mbc)); in mbm_get_a2()
724 bzero(&mbc, sizeof (mbc)); in mbm_get_u0()
763 bzero(&mbc, sizeof (mbc)); in mbm_get_u1()
799 bzero(&mbc, sizeof (mbc)); in mbm_get_u2()
829 bzero(&mbc, sizeof (mbc)); in mbm_get_u3()
[all …]
/illumos-gate/usr/src/uts/common/fs/smbsrv/
H A Dsmb_mbuf_marshaling.c420 (void) MBC_SHADOW_CHAIN(&tmp, mbc, offset, mbc->max_bytes - offset); in smb_mbc_peek()
880 m = mbc->chain; in smb_mbc_put_mem()
959 mbc->chain = m; in mbc_marshal_make_room()
1035 mbc->chain_offset++; in mbc_marshal_store_byte()
1256 t = &mbc->chain; in mbc_marshal_put_uio()
1312 mbc->chain = mbuf; in mbc_marshal_put_mbufs()
1335 smb_mbuf_trim(mbc->chain, mbc->chain_offset); in mbc_marshal_put_mbufs()
1336 m = mbc->chain; in mbc_marshal_put_mbufs()
1376 mbc->chain_offset++; in mbc_marshal_fetch_byte()
1699 bytes = mbc->max_bytes - mbc->chain_offset; in mbc_marshal_get_mbuf_chain()
[all …]
H A Dsmb_nt_transact_security.c231 (void) smb_mbc_encodef(mbc, "b.w", in smb_encode_sd()
267 smb_encode_sid(mbc, sd->sd_owner); in smb_encode_sd()
289 (void) smb_mbc_encodef(mbc, "bb", in smb_encode_sid()
293 (void) smb_mbc_encodef(mbc, "b", in smb_encode_sid()
298 (void) smb_mbc_encodef(mbc, "l", in smb_encode_sid()
326 smb_encode_sid(mbc, ace->se_sid); in smb_encode_sacl()
353 smb_encode_sid(mbc, ace->se_sid); in smb_encode_dacl()
379 mbc->chain_offset, in smb_decode_sd()
380 mbc->max_bytes - mbc->chain_offset); in smb_decode_sd()
458 offset += mbc->chain_offset; in smb_decode_sid()
[all …]
H A Dsmb_signing.c72 struct mbuf_chain *mbc, in smb_sign_find_seqnum() argument
234 struct mbuf *mbuf = mbc->chain; in smb_sign_calc()
235 int offset = mbc->chain_offset; in smb_sign_calc()
331 struct mbuf_chain mbc = sr->command; in smb_sign_check_request() local
344 mbc.chain_offset = sr->orig_request_hdr; in smb_sign_check_request()
381 struct mbuf_chain mbc = sr->command; in smb_sign_check_secondary() local
386 mbc.chain_offset = sr->orig_request_hdr; in smb_sign_check_secondary()
414 struct mbuf_chain mbc; in smb_sign_reply() local
418 mbc = *reply; in smb_sign_reply()
420 mbc = sr->reply; in smb_sign_reply()
[all …]
H A Dsmb_quota.c146 mb_offset = offset + mbc->chain_offset; in smb_quota_decode_sids()
148 rc = MBC_SHADOW_CHAIN(&sidbuf, mbc, in smb_quota_decode_sids()
161 sid = smb_decode_sid(mbc, sid_offset); in smb_quota_decode_sids()
227 mb_offset = offset + mbc->chain_offset; in smb_quota_decode_quotas()
229 rc = MBC_SHADOW_CHAIN(&quotabuf, mbc, in smb_quota_decode_quotas()
247 sid = smb_decode_sid(mbc, sid_offset); in smb_quota_decode_quotas()
321 if (!MBC_ROOM_FOR(mbc, next_offset)) { in smb_quota_encode_quotas()
325 if (!MBC_ROOM_FOR(mbc, in smb_quota_encode_quotas()
330 rc = smb_mbc_encodef(mbc, "llqqqq", in smb_quota_encode_quotas()
334 smb_encode_sid(mbc, sid); in smb_quota_encode_quotas()
[all …]
H A Dsmb_mbuf_util.c108 mbuf_chain_t *mbc; in smb_mbc_alloc() local
112 bzero(mbc, sizeof (*mbc)); in smb_mbc_alloc()
118 mbc->chain = m; in smb_mbc_alloc()
123 return (mbc); in smb_mbc_alloc()
129 SMB_MBC_VALID(mbc); in smb_mbc_free()
131 m_freem(mbc->chain); in smb_mbc_free()
132 mbc->chain = NULL; in smb_mbc_free()
133 mbc->mbc_magic = 0; in smb_mbc_free()
494 off > mbc->max_bytes || x > mbc->max_bytes) in MBC_SHADOW_CHAIN()
497 *submbc = *mbc; in MBC_SHADOW_CHAIN()
[all …]
H A Dsmb2_signing.c75 struct mbuf_chain *mbc, in smb2_sign_calc() argument
80 rv = smb2_sign_calc_common(sr, mbc, digest16, &smb2_sign_ops); in smb2_sign_calc()
112 struct mbuf_chain *mbc, in smb3_sign_calc() argument
117 rv = smb2_sign_calc_common(sr, mbc, digest16, &smb3_sign_ops); in smb3_sign_calc()
251 smb2_sign_calc_common(smb_request_t *sr, struct mbuf_chain *mbc, in smb2_sign_calc_common() argument
276 offset = mbc->chain_offset; in smb2_sign_calc_common()
277 resid = mbc->max_bytes - offset; in smb2_sign_calc_common()
278 if (smb_mbc_peek(mbc, offset, "#c", tlen, tmp_hdr) != 0) in smb2_sign_calc_common()
293 mbuf = mbc->chain; in smb2_sign_calc_common()
363 struct mbuf_chain *mbc = &sr->smb_data; in smb2_sign_check_request() local
[all …]
H A Dsmb_dfs.c395 (void) smb_mbc_encodef(mbc, "wwl", path_consumed, in smb_dfs_encode_hdr()
410 rep_bufsize = MBC_MAXBYTES(mbc); in smb_dfs_encode_refv1()
426 (void) smb_mbc_encodef(mbc, "wwwwU", in smb_dfs_encode_refv1()
482 rep_bufsize = MBC_MAXBYTES(mbc); in smb_dfs_encode_refv2()
512 (void) smb_mbc_encodef(mbc, "wwwwllwww", in smb_dfs_encode_refv2()
520 smb_dfs_encode_targets(mbc, referrals); in smb_dfs_encode_refv2()
545 rep_bufsize = MBC_MAXBYTES(mbc); in smb_dfs_encode_refv3x()
577 (void) smb_mbc_encodef(mbc, "wwwwlwww16.", in smb_dfs_encode_refv3x()
585 smb_dfs_encode_targets(mbc, referrals); in smb_dfs_encode_refv3x()
611 (void) smb_mbc_encodef(mbc, "UU", referrals->i_uncpath, in smb_dfs_encode_targets()
[all …]
H A Dsmb2_fsctl_odx.c859 int start_pos = mbc->chain_offset; in smb_odx_get_token()
872 mbc, "l..w", in smb_odx_get_token()
883 rc = MBC_SHADOW_CHAIN(&tok_mbc, mbc, in smb_odx_get_token()
884 mbc->chain_offset, tok->tok_len); in smb_odx_get_token()
915 mbc, "qqqql", in smb_odx_get_token_native1()
933 int start_pos = mbc->chain_offset; in smb_odx_put_token()
946 mbc, "lww", in smb_odx_put_token()
958 rc = smb_odx_put_token_native1(mbc, in smb_odx_put_token()
967 if (mbc->chain_offset < end_pos) { in smb_odx_put_token()
971 ASSERT(mbc->chain_offset == end_pos); in smb_odx_put_token()
[all …]
H A Dsmb2_create.c1039 mbuf_chain_t *mbc = &sr->raw_data; in smb2_encode_create_ctx() local
1050 last_top = mbc->chain_offset; in smb2_encode_create_ctx()
1056 mbc->chain_offset - last_top); in smb2_encode_create_ctx()
1070 last_top = mbc->chain_offset; in smb2_encode_create_ctx()
1076 mbc->chain_offset - last_top); in smb2_encode_create_ctx()
1083 last_top = mbc->chain_offset; in smb2_encode_create_ctx()
1089 mbc->chain_offset - last_top); in smb2_encode_create_ctx()
1111 last_top = mbc->chain_offset; in smb2_encode_create_ctx()
1117 mbc->chain_offset - last_top); in smb2_encode_create_ctx()
1126 last_top = mbc->chain_offset; in smb2_encode_create_ctx()
[all …]
H A Dsmb_notify.c722 mbuf_chain_t *mbc; in smb_notify_encode_action() local
744 mbc = &nc->nc_buffer; in smb_notify_encode_action()
746 if (MBC_ROOM_FOR(mbc, totlen) == 0) { in smb_notify_encode_action()
756 nc->nc_last_off = mbc->chain_offset; in smb_notify_encode_action()
773 (void) smb_mbc_encodef(mbc, "lllU..", in smb_notify_encode_action()
776 mbc->chain_offset = nc->nc_last_off + totlen; in smb_notify_encode_action()
H A Dsmb2_dispatch.c130 struct mbuf_chain *mbc = &sr->command; in smb2sr_newrq() local
135 if (smb_mbc_peek(mbc, 0, "l", &magic) != 0) in smb2sr_newrq()
146 if (smb_mbc_peek(mbc, 0, "l", &magic) != 0) in smb2sr_newrq()
210 if (MBC_ROOM_FOR(mbc, skip) == 0) in smb2sr_newrq()
212 mbc->chain_offset += skip; in smb2sr_newrq()
215 mbc->chain_offset = 0; in smb2sr_newrq()
1545 if (mbc != NULL && (len = MBC_LENGTH(mbc)) != 0) { in smb2sr_put_error_data()
1552 mbc); /* C */ in smb2sr_put_error_data()
1568 mbuf_chain_t *mbc) in smb2sr_put_error_ctx() argument
1585 if (mbc != NULL && (len = MBC_LENGTH(mbc)) != 0) { in smb2sr_put_error_ctx()
[all …]
H A Dsmb_session.c152 if (mbc != NULL && (m = mbc->chain) != NULL) { in smb_session_send()
153 nbt_len = MBC_LENGTH(mbc); in smb_session_send()
154 m = m_prepend(mbc->chain, NETBIOS_HDR_SZ, M_WAIT); in smb_session_send()
155 mbc->chain = NULL; in smb_session_send()
178 if (mbc != NULL && mbc->chain != NULL) { in smb_session_send()
179 m_freem(mbc->chain); in smb_session_send()
180 mbc->chain = NULL; in smb_session_send()
205 struct mbuf_chain mbc; in smb_netbios_session_request() local
252 MBC_INIT(&mbc, MAX_DATAGRAM_LENGTH); in smb_netbios_session_request()
253 (void) smb_mbc_encodef(&mbc, "b", in smb_netbios_session_request()
[all …]
H A Dsmb_query_fileinfo.c616 smb_query_stream_info(smb_request_t *sr, mbuf_chain_t *mbc, in smb_query_stream_info() argument
646 ASSERT(mbc->chain_offset == 0); in smb_query_stream_info()
672 rc = smb_mbc_encodef(mbc, "%llqq#u", sr, in smb_query_stream_info()
708 rc = smb_mbc_put_align(mbc, 8); in smb_query_stream_info()
713 cur_ent_off = mbc->chain_offset; in smb_query_stream_info()
721 rc = smb_mbc_encodef(mbc, "%llqq#u", sr, in smb_query_stream_info()
739 (void) smb_mbc_poke(mbc, prev_ent_off, "l", in smb_query_stream_info()
H A Dsmb31_preauth.c141 smb31_preauth_sha512_calc(smb_request_t *sr, struct mbuf_chain *mbc, in smb31_preauth_sha512_calc() argument
146 struct mbuf *mbuf = mbc->chain; in smb31_preauth_sha512_calc()
H A Dsmb3_encrypt.c220 smb3_decode_tform_header(smb_request_t *sr, struct mbuf_chain *mbc) in smb3_decode_tform_header() argument
227 mbc, "l16c16cl..wq", in smb3_decode_tform_header()
252 smb3_encode_tform_header(smb_request_t *sr, struct mbuf_chain *mbc) in smb3_encode_tform_header() argument
257 mbc, "l16.16clwwq", in smb3_encode_tform_header()
H A Dsmb2_fsctl_copychunk.c258 smb2_fsctl_copychunk_decode(smb_request_t *sr, mbuf_chain_t *mbc) in smb2_fsctl_copychunk_decode() argument
269 mbc, "qqll", in smb2_fsctl_copychunk_decode()
/illumos-gate/usr/src/cmd/xargs/
H A Dxargs.c577 char mbc[MB_LEN_MAX]; in getarg() local
589 c = getwchr(mbc, &len); in getarg()
601 store_str(&arg, mbc, len); in getarg()
637 store_str(&arg, mbc, len); in getarg()
653 store_str(&arg, mbc, len); in getarg()
672 store_str(&arg, mbc, len); in getarg()
682 store_str(&arg, mbc, len); in getarg()
690 store_str(&arg, mbc, len); in getarg()
867 getwchr(char *mbc, size_t *sz) in getwchr() argument
889 mbc[i++] = (char)c; in getwchr()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libcmd/
H A Dwclib.c56 #define mbc(c) ((c)&WC_MB) macro
372 if(mbc(lasttype)) in wc_count()
405 if(mbc(c)) in wc_count()
460 } while (mbc(c = type[*cp++])); in wc_count()
471 while(mbc(c) && ((c|WC_ERR) || (c&7)==0)) in wc_count()
478 if(mbc(c)) in wc_count()
491 if(mbc(c)) in wc_count()
/illumos-gate/usr/src/cmd/mdb/common/mdb/
H A Dmdb_ctf.c981 n = mdb_snprintf(*mbc->mbc_bufp, *mbc->mbc_lenp, "%s", name); in offset_to_name_cb()
982 mbc->mbc_total += n; in offset_to_name_cb()
984 n = *mbc->mbc_lenp; in offset_to_name_cb()
986 *mbc->mbc_lenp -= n; in offset_to_name_cb()
987 *mbc->mbc_bufp += n; in offset_to_name_cb()
990 *mbc->mbc_idp = id; in offset_to_name_cb()
1001 mbr_contains_t mbc; in mdb_ctf_offset_to_name() local
1013 mbc.mbc_bufp = &buf; in mdb_ctf_offset_to_name()
1016 mbc.mbc_idp = &id; in mdb_ctf_offset_to_name()
1017 mbc.mbc_total = 0; in mdb_ctf_offset_to_name()
[all …]
/illumos-gate/usr/src/lib/smbsrv/libfksmbsrv/common/
H A Dfksmb_preauth_pkcs.c128 smb31_preauth_sha512_calc(smb_request_t *sr, struct mbuf_chain *mbc, in smb31_preauth_sha512_calc() argument
133 struct mbuf *mbuf = mbc->chain; in smb31_preauth_sha512_calc()
/illumos-gate/usr/src/lib/libc/port/regex/
H A Dengine.c156 int wc, mbc; in stepback() local
165 for (mbc = 1; mbc <= max; mbc++) { in stepback()
166 if ((ret - mbc) < start) in stepback()
169 clen = mbrtowc(NULL, ret - mbc, mbc, &mbs); in stepback()
173 if (mbc > max) in stepback()
175 ret -= mbc; in stepback()
/illumos-gate/usr/src/cmd/mdb/common/modules/smbsrv/
H A Dsmbsrv_pcap.c206 smbsrv_pcap_dump(struct mbuf_chain *mbc, int32_t smb_len, in smbsrv_pcap_dump() argument
228 if (mbc->chain == NULL) in smbsrv_pcap_dump()
384 &dump_state, (uintptr_t)mbc->chain); in smbsrv_pcap_dump()
/illumos-gate/usr/src/cmd/csh/
H A Dsh.file.c171 char mbc[MB_LEN_MAX]; in pushback() local
172 int i, j = wctomb(mbc, (wchar_t)*p); in pushback()
179 if (ioctl(SHIN, TIOCSTI, mbc + i) != 0 && in pushback()
/illumos-gate/usr/src/uts/common/io/i40e/core/
H A Di40e_dcb.c206 dcbcfg->pfc.mbc = (u8)((buf[0] & I40E_IEEE_PFC_MBC_MASK) >> in i40e_parse_ieee_pfccfg_tlv()
1179 if (dcbcfg->pfc.mbc) in i40e_add_ieee_pfc_tlv()

12