Symbol: sd
crypto/heimdal/lib/hdb/hdb-ldap.c
1550
int sd;
crypto/heimdal/lib/hdb/hdb-ldap.c
1552
if (ldap_get_option(HDB2LDAP(db), LDAP_OPT_DESC, &sd) == 0 &&
crypto/heimdal/lib/hdb/hdb-ldap.c
1553
getpeername(sd, (struct sockaddr *) &addr, &len) < 0) {
crypto/heimdal/lib/hx509/cms.c
1054
if (sd.signerInfos.len == 0 && (flags & HX509_CMS_VS_ALLOW_ZERO_SIGNER)) {
crypto/heimdal/lib/hx509/cms.c
1066
ret = der_copy_oid(&sd.encapContentInfo.eContentType, contentType);
crypto/heimdal/lib/hx509/cms.c
1073
free_SignedData(&sd);
crypto/heimdal/lib/hx509/cms.c
1178
SignedData sd;
crypto/heimdal/lib/hx509/cms.c
1200
SignedData *sd = &sigctx->sd;
crypto/heimdal/lib/hx509/cms.c
1228
ptr = realloc(sd->signerInfos.val,
crypto/heimdal/lib/hx509/cms.c
1229
(sd->signerInfos.len + 1) * sizeof(sd->signerInfos.val[0]));
crypto/heimdal/lib/hx509/cms.c
1234
sd->signerInfos.val = ptr;
crypto/heimdal/lib/hx509/cms.c
1236
signer_info = &sd->signerInfos.val[sd->signerInfos.len];
crypto/heimdal/lib/hx509/cms.c
1366
sigctx->sd.signerInfos.len++;
crypto/heimdal/lib/hx509/cms.c
1412
const unsigned int i = sigctx->sd.certificates->len;
crypto/heimdal/lib/hx509/cms.c
1416
ptr = realloc(sigctx->sd.certificates->val,
crypto/heimdal/lib/hx509/cms.c
1417
(i + 1) * sizeof(sigctx->sd.certificates->val[0]));
crypto/heimdal/lib/hx509/cms.c
1420
sigctx->sd.certificates->val = ptr;
crypto/heimdal/lib/hx509/cms.c
1423
&sigctx->sd.certificates->val[i]);
crypto/heimdal/lib/hx509/cms.c
1425
sigctx->sd.certificates->len++;
crypto/heimdal/lib/hx509/cms.c
1495
sigctx.sd.version = CMSVersion_v3;
crypto/heimdal/lib/hx509/cms.c
1497
der_copy_oid(eContentType, &sigctx.sd.encapContentInfo.eContentType);
crypto/heimdal/lib/hx509/cms.c
1503
ALLOC(sigctx.sd.encapContentInfo.eContent, 1);
crypto/heimdal/lib/hx509/cms.c
1504
if (sigctx.sd.encapContentInfo.eContent == NULL) {
crypto/heimdal/lib/hx509/cms.c
1510
sigctx.sd.encapContentInfo.eContent->data = malloc(length);
crypto/heimdal/lib/hx509/cms.c
1511
if (sigctx.sd.encapContentInfo.eContent->data == NULL) {
crypto/heimdal/lib/hx509/cms.c
1516
memcpy(sigctx.sd.encapContentInfo.eContent->data, data, length);
crypto/heimdal/lib/hx509/cms.c
1517
sigctx.sd.encapContentInfo.eContent->length = length;
crypto/heimdal/lib/hx509/cms.c
1530
if (sigctx.sd.signerInfos.len) {
crypto/heimdal/lib/hx509/cms.c
1535
for (i = 0; i < sigctx.sd.signerInfos.len; i++) {
crypto/heimdal/lib/hx509/cms.c
1537
&sigctx.sd.signerInfos.val[i].digestAlgorithm;
crypto/heimdal/lib/hx509/cms.c
1539
for (j = 0; j < sigctx.sd.digestAlgorithms.len; j++)
crypto/heimdal/lib/hx509/cms.c
1540
if (cmp_AlgorithmIdentifier(di, &sigctx.sd.digestAlgorithms.val[j]) == 0)
crypto/heimdal/lib/hx509/cms.c
1542
if (j == sigctx.sd.digestAlgorithms.len) {
crypto/heimdal/lib/hx509/cms.c
1543
ret = add_DigestAlgorithmIdentifiers(&sigctx.sd.digestAlgorithms, di);
crypto/heimdal/lib/hx509/cms.c
1556
ALLOC(sigctx.sd.certificates, 1);
crypto/heimdal/lib/hx509/cms.c
1557
if (sigctx.sd.certificates == NULL) {
crypto/heimdal/lib/hx509/cms.c
1570
&sigctx.sd, &size, ret);
crypto/heimdal/lib/hx509/cms.c
1580
free_SignedData(&sigctx.sd);
crypto/heimdal/lib/hx509/cms.c
720
any_to_certs(hx509_context context, const SignedData *sd, hx509_certs certs)
crypto/heimdal/lib/hx509/cms.c
725
if (sd->certificates == NULL)
crypto/heimdal/lib/hx509/cms.c
728
for (i = 0; i < sd->certificates->len; i++) {
crypto/heimdal/lib/hx509/cms.c
732
sd->certificates->val[i].data,
crypto/heimdal/lib/hx509/cms.c
733
sd->certificates->val[i].length,
crypto/heimdal/lib/hx509/cms.c
793
SignedData sd;
crypto/heimdal/lib/hx509/cms.c
804
memset(&sd, 0, sizeof(sd));
crypto/heimdal/lib/hx509/cms.c
806
ret = decode_SignedData(data, length, &sd, &size);
crypto/heimdal/lib/hx509/cms.c
813
if (sd.encapContentInfo.eContent == NULL && signedContent == NULL) {
crypto/heimdal/lib/hx509/cms.c
819
if (sd.encapContentInfo.eContent && signedContent) {
crypto/heimdal/lib/hx509/cms.c
826
if (sd.encapContentInfo.eContent)
crypto/heimdal/lib/hx509/cms.c
827
ret = der_copy_octet_string(sd.encapContentInfo.eContent, content);
crypto/heimdal/lib/hx509/cms.c
847
ret = any_to_certs(context, &sd, certs);
crypto/heimdal/lib/hx509/cms.c
857
for (found_valid_sig = 0, i = 0; i < sd.signerInfos.len; i++) {
crypto/heimdal/lib/hx509/cms.c
862
signer_info = &sd.signerInfos.val[i];
crypto/heimdal/lib/hx509/cms.c
999
if (der_heim_oid_cmp(match_oid, &sd.encapContentInfo.eContentType) &&
crypto/heimdal/lib/hx509/hxtool.c
183
heim_octet_string c, co, signeddata, *sd = NULL;
crypto/heimdal/lib/hx509/hxtool.c
2029
heim_octet_string sd, c;
crypto/heimdal/lib/hx509/hxtool.c
2039
NULL, cert, NULL, NULL, NULL, &sd);
crypto/heimdal/lib/hx509/hxtool.c
2043
ret = hx509_cms_verify_signed(context, vctx, 0, sd.data, sd.length,
crypto/heimdal/lib/hx509/hxtool.c
2045
free(sd.data);
crypto/heimdal/lib/hx509/hxtool.c
240
sd = &signeddata;
crypto/heimdal/lib/hx509/hxtool.c
257
sd = &signeddata;
crypto/heimdal/lib/hx509/hxtool.c
288
ret = hx509_cms_verify_signed(context, ctx, flags, co.data, co.length, sd,
crypto/heimdal/lib/hx509/hxtool.c
327
if (sd)
crypto/heimdal/lib/hx509/hxtool.c
328
_hx509_unmap_file_os(sd);
crypto/heimdal/lib/krb5/log.c
190
struct _heimdal_syslog_data *sd = malloc(sizeof(*sd));
crypto/heimdal/lib/krb5/log.c
193
if(sd == NULL) {
crypto/heimdal/lib/krb5/log.c
201
sd->priority = i;
crypto/heimdal/lib/krb5/log.c
205
sd->priority |= i;
crypto/heimdal/lib/krb5/log.c
208
log_syslog, close_syslog, sd);
crypto/heimdal/lib/roken/getifaddrs.c
275
nl_sendreq(int sd, int request, int flags, int *seq)
crypto/heimdal/lib/roken/getifaddrs.c
296
return (sendto(sd, (void *)req_hdr, req_hdr->nlmsg_len, 0,
crypto/heimdal/lib/roken/getifaddrs.c
301
nl_recvmsg(int sd, int request, int seq,
crypto/heimdal/lib/roken/getifaddrs.c
318
read_len = recvmsg(sd, &msg, 0);
crypto/heimdal/lib/roken/getifaddrs.c
328
nl_getmsg(int sd, int request, int seq,
crypto/heimdal/lib/roken/getifaddrs.c
345
result = read_size = nl_recvmsg(sd, request, seq, buff, bufsize, &msg_flags);
crypto/heimdal/lib/roken/getifaddrs.c
386
nl_getlist(int sd, int seq,
crypto/heimdal/lib/roken/getifaddrs.c
397
status = nl_sendreq(sd, request, NLM_F_ROOT|NLM_F_MATCH, &seq);
crypto/heimdal/lib/roken/getifaddrs.c
405
pfd.fd = sd;
crypto/heimdal/lib/roken/getifaddrs.c
418
status = nl_getmsg(sd, request, seq, &nlh, &done);
crypto/heimdal/lib/roken/getifaddrs.c
475
nl_close(int sd)
crypto/heimdal/lib/roken/getifaddrs.c
478
if (sd >= 0) __close(sd);
crypto/heimdal/lib/roken/getifaddrs.c
487
int sd;
crypto/heimdal/lib/roken/getifaddrs.c
489
sd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
crypto/heimdal/lib/roken/getifaddrs.c
490
if (sd < 0) return -1;
crypto/heimdal/lib/roken/getifaddrs.c
493
if (bind(sd, (struct sockaddr*)&nladdr, sizeof(nladdr)) < 0){
crypto/heimdal/lib/roken/getifaddrs.c
494
nl_close(sd);
crypto/heimdal/lib/roken/getifaddrs.c
497
return sd;
crypto/heimdal/lib/roken/getifaddrs.c
504
int sd;
crypto/heimdal/lib/roken/getifaddrs.c
526
sd = nl_open();
crypto/heimdal/lib/roken/getifaddrs.c
527
if (sd < 0)
crypto/heimdal/lib/roken/getifaddrs.c
532
if ((seq = nl_getlist(sd, 0, RTM_GETLINK,
crypto/heimdal/lib/roken/getifaddrs.c
535
nl_close(sd);
crypto/heimdal/lib/roken/getifaddrs.c
538
if ((seq = nl_getlist(sd, seq+1, RTM_GETADDR,
crypto/heimdal/lib/roken/getifaddrs.c
541
nl_close(sd);
crypto/heimdal/lib/roken/getifaddrs.c
852
nl_close(sd);
crypto/krb5/src/ccapi/common/win/OldCC/util.cxx
316
SECURITY_DESCRIPTOR sd;
crypto/krb5/src/ccapi/common/win/OldCC/util.cxx
353
if (!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION)) status = GetLastError();
crypto/krb5/src/ccapi/common/win/OldCC/util.cxx
357
if (!SetSecurityDescriptorDacl(&sd, TRUE, pAcl, FALSE)) status = GetLastError();
crypto/krb5/src/ccapi/common/win/OldCC/util.cxx
361
if (!SetSecurityDescriptorOwner(&sd, pSid, FALSE)) status = GetLastError();
crypto/krb5/src/ccapi/common/win/OldCC/util.cxx
365
if (!IsValidSecurityDescriptor(&sd)) status = ERROR_INVALID_PARAMETER;
crypto/krb5/src/ccapi/common/win/OldCC/util.cxx
372
BOOL ok = MakeSelfRelativeSD(&sd, 0, &size);
crypto/krb5/src/ccapi/common/win/OldCC/util.cxx
383
if (!MakeSelfRelativeSD(&sd, *ppsd, &size)) status = GetLastError();
crypto/krb5/src/lib/crypto/crypto_tests/vectors.c
120
krb5_data sd;
crypto/krb5/src/lib/crypto/crypto_tests/vectors.c
130
sd.length = strlen (s);
crypto/krb5/src/lib/crypto/crypto_tests/vectors.c
131
sd.data = (char *) s;
crypto/krb5/src/lib/crypto/crypto_tests/vectors.c
141
r = krb5int_des_string_to_key (0, &pd, &sd, 0, &key);
crypto/krb5/src/lib/crypto/crypto_tests/vectors.c
166
krb5_data pd, sd;
crypto/krb5/src/lib/crypto/crypto_tests/vectors.c
174
sd.length = strlen (s);
crypto/krb5/src/lib/crypto/crypto_tests/vectors.c
175
sd.data = (char *) s;
crypto/krb5/src/lib/crypto/crypto_tests/vectors.c
186
r = krb5_c_string_to_key (0, enctype, &pd, &sd, &key);
crypto/krb5/src/lib/rpc/bindresvport.c
51
bindresvport_sa(int sd, struct sockaddr *sa)
crypto/krb5/src/lib/rpc/bindresvport.c
65
res = getsockname(sd, sa, &salen);
crypto/krb5/src/lib/rpc/bindresvport.c
83
res = bind(sd, sa, sa_socklen(sa));
crypto/krb5/src/lib/rpc/bindresvport.c
89
bindresvport(int sd, struct sockaddr_in *sockin)
crypto/krb5/src/lib/rpc/bindresvport.c
91
return (bindresvport_sa(sd, (struct sockaddr *)sockin));
crypto/openssh/openbsd-compat/bindresvport.c
102
error = bind(sd, sa, salen);
crypto/openssh/openbsd-compat/bindresvport.c
54
bindresvport_sa(int sd, struct sockaddr *sa)
crypto/openssh/openbsd-compat/bindresvport.c
70
if (getsockname(sd, sa, &salen) == -1)
crypto/openssh/openbsd-compat/openbsd-compat.h
69
int bindresvport_sa(int sd, struct sockaddr *sa);
crypto/openssl/crypto/cms/cms_sd.c
1015
CMS_SignedData *sd;
crypto/openssl/crypto/cms/cms_sd.c
1018
sd = cms_get0_signed(cms);
crypto/openssl/crypto/cms/cms_sd.c
1019
if (sd == NULL)
crypto/openssl/crypto/cms/cms_sd.c
102
if (sd->version < 3)
crypto/openssl/crypto/cms/cms_sd.c
1022
cms_sd_set_version(sd);
crypto/openssl/crypto/cms/cms_sd.c
1023
for (i = 0; i < sk_X509_ALGOR_num(sd->digestAlgorithms); i++) {
crypto/openssl/crypto/cms/cms_sd.c
1027
digestAlgorithm = sk_X509_ALGOR_value(sd->digestAlgorithms, i);
crypto/openssl/crypto/cms/cms_sd.c
103
sd->version = 3;
crypto/openssl/crypto/cms/cms_sd.c
109
if (sd->version < 1)
crypto/openssl/crypto/cms/cms_sd.c
110
sd->version = 1;
crypto/openssl/crypto/cms/cms_sd.c
1121
BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data,
crypto/openssl/crypto/cms/cms_sd.c
1131
if (sd == NULL) {
crypto/openssl/crypto/cms/cms_sd.c
1141
ci->d.signedData = sd;
crypto/openssl/crypto/cms/cms_sd.c
348
CMS_SignedData *sd;
crypto/openssl/crypto/cms/cms_sd.c
358
sd = cms_signed_data_init(cms);
crypto/openssl/crypto/cms/cms_sd.c
359
if (!sd)
crypto/openssl/crypto/cms/cms_sd.c
390
if (sd->version < 3)
crypto/openssl/crypto/cms/cms_sd.c
391
sd->version = 3;
crypto/openssl/crypto/cms/cms_sd.c
420
for (i = 0; i < sk_X509_ALGOR_num(sd->digestAlgorithms); i++) {
crypto/openssl/crypto/cms/cms_sd.c
424
alg = sk_X509_ALGOR_value(sd->digestAlgorithms, i);
crypto/openssl/crypto/cms/cms_sd.c
431
if (i == sk_X509_ALGOR_num(sd->digestAlgorithms)) {
crypto/openssl/crypto/cms/cms_sd.c
437
if (!sk_X509_ALGOR_push(sd->digestAlgorithms, alg)) {
crypto/openssl/crypto/cms/cms_sd.c
547
if (sd->signerInfos == NULL)
crypto/openssl/crypto/cms/cms_sd.c
548
sd->signerInfos = sk_CMS_SignerInfo_new_null();
crypto/openssl/crypto/cms/cms_sd.c
549
if (sd->signerInfos == NULL || !sk_CMS_SignerInfo_push(sd->signerInfos, si)) {
crypto/openssl/crypto/cms/cms_sd.c
621
CMS_SignedData *sd = cms_get0_signed(cms);
crypto/openssl/crypto/cms/cms_sd.c
623
return sd != NULL ? sd->signerInfos : NULL;
crypto/openssl/crypto/cms/cms_sd.c
64
static void cms_sd_set_version(CMS_SignedData *sd)
crypto/openssl/crypto/cms/cms_sd.c
674
CMS_SignedData *sd;
crypto/openssl/crypto/cms/cms_sd.c
682
sd = cms_get0_signed(cms);
crypto/openssl/crypto/cms/cms_sd.c
683
if (sd == NULL)
crypto/openssl/crypto/cms/cms_sd.c
685
certs = sd->certificates;
crypto/openssl/crypto/cms/cms_sd.c
686
for (i = 0; i < sk_CMS_SignerInfo_num(sd->signerInfos); i++) {
crypto/openssl/crypto/cms/cms_sd.c
687
si = sk_CMS_SignerInfo_value(sd->signerInfos, i);
crypto/openssl/crypto/cms/cms_sd.c
71
for (i = 0; i < sk_CMS_CertificateChoices_num(sd->certificates); i++) {
crypto/openssl/crypto/cms/cms_sd.c
72
cch = sk_CMS_CertificateChoices_value(sd->certificates, i);
crypto/openssl/crypto/cms/cms_sd.c
74
if (sd->version < 5)
crypto/openssl/crypto/cms/cms_sd.c
75
sd->version = 5;
crypto/openssl/crypto/cms/cms_sd.c
77
if (sd->version < 4)
crypto/openssl/crypto/cms/cms_sd.c
78
sd->version = 4;
crypto/openssl/crypto/cms/cms_sd.c
80
if (sd->version < 3)
crypto/openssl/crypto/cms/cms_sd.c
81
sd->version = 3;
crypto/openssl/crypto/cms/cms_sd.c
85
for (i = 0; i < sk_CMS_RevocationInfoChoice_num(sd->crls); i++) {
crypto/openssl/crypto/cms/cms_sd.c
86
rch = sk_CMS_RevocationInfoChoice_value(sd->crls, i);
crypto/openssl/crypto/cms/cms_sd.c
88
if (sd->version < 5)
crypto/openssl/crypto/cms/cms_sd.c
89
sd->version = 5;
crypto/openssl/crypto/cms/cms_sd.c
93
if ((OBJ_obj2nid(sd->encapContentInfo->eContentType) != NID_pkcs7_data)
crypto/openssl/crypto/cms/cms_sd.c
94
&& (sd->version < 3))
crypto/openssl/crypto/cms/cms_sd.c
95
sd->version = 3;
crypto/openssl/crypto/cms/cms_sd.c
97
for (i = 0; i < sk_CMS_SignerInfo_num(sd->signerInfos); i++) {
crypto/openssl/crypto/cms/cms_sd.c
98
si = sk_CMS_SignerInfo_value(sd->signerInfos, i);
crypto/openssl/crypto/crmf/crmf_lib.c
673
CMS_SignedData *sd = NULL;
crypto/openssl/crypto/crmf/crmf_lib.c
709
sd = ASN1_item_d2i_bio(ASN1_ITEM_rptr(CMS_SignedData), bio, NULL);
crypto/openssl/crypto/crmf/crmf_lib.c
710
if (sd == NULL)
crypto/openssl/crypto/crmf/crmf_lib.c
729
pkey_bio = CMS_SignedData_verify(sd, NULL, NULL /* scerts */, ts,
crypto/openssl/crypto/crmf/crmf_lib.c
747
CMS_SignedData_free(sd);
crypto/openssl/include/openssl/cms.h
405
BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data,
crypto/openssl/test/moduleloadtest.c
24
SD sd = SD_INIT;
crypto/openssl/test/moduleloadtest.c
28
if (!sd_load(path, &sd, SD_MODULE))
crypto/openssl/test/moduleloadtest.c
30
ret = symbol == NULL || sd_sym(sd, symbol, &sym);
crypto/openssl/test/moduleloadtest.c
31
if (!sd_close(sd))
crypto/openssl/test/simpledynamic.h
45
int sd_load(const char *filename, SD *sd, int type);
crypto/openssl/test/simpledynamic.h
46
int sd_sym(SD sd, const char *symname, SD_SYM *sym);
crypto/openssl/test/testutil.h
629
void test_random_seed(uint32_t sd);
crypto/openssl/test/testutil/random.c
29
void test_random_seed(uint32_t sd)
crypto/openssl/test/testutil/random.c
35
test_random_state[0] = sd;
lib/libc/net/sctp_sys_calls.c
101
sctp_connectx(int sd, const struct sockaddr *addrs, int addrcnt,
lib/libc/net/sctp_sys_calls.c
1166
ret = sendmsg(sd, &msg, flags);
lib/libc/net/sctp_sys_calls.c
1169
*assoc_id = sctp_getassocid(sd, addrs);
lib/libc/net/sctp_sys_calls.c
1178
sctp_peeloff(int sd, sctp_assoc_t assoc_id)
lib/libc/net/sctp_sys_calls.c
1188
sctp_peeloff(int sd, sctp_assoc_t assoc_id)
lib/libc/net/sctp_sys_calls.c
1190
return (syscall(SYS_sctp_peeloff, sd, assoc_id));
lib/libc/net/sctp_sys_calls.c
160
ret = setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X, (void *)buf,
lib/libc/net/sctp_sys_calls.c
170
sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt, int flags)
lib/libc/net/sctp_sys_calls.c
263
if (setsockopt(sd, IPPROTO_SCTP, flags, sa, sa->sa_len) != 0) {
lib/libc/net/sctp_sys_calls.c
272
sctp_opt_info(int sd, sctp_assoc_t id, int opt, void *arg, socklen_t *size)
lib/libc/net/sctp_sys_calls.c
383
return (getsockopt(sd, IPPROTO_SCTP, opt, arg, size));
lib/libc/net/sctp_sys_calls.c
387
sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs)
lib/libc/net/sctp_sys_calls.c
403
if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_REMOTE_ADDR_SIZE,
lib/libc/net/sctp_sys_calls.c
419
if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_PEER_ADDRESSES,
lib/libc/net/sctp_sys_calls.c
447
sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs)
lib/libc/net/sctp_sys_calls.c
462
if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDR_SIZE,
lib/libc/net/sctp_sys_calls.c
474
if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDRESSES, addrs,
lib/libc/net/sctp_sys_calls.c
615
sctp_getassocid(int sd, struct sockaddr *sa)
lib/libc/net/sctp_sys_calls.c
624
if (getsockopt(sd, IPPROTO_SCTP,
lib/libc/net/sctp_sys_calls.c
633
sctp_send(int sd, const void *data, size_t len,
lib/libc/net/sctp_sys_calls.c
641
return (syscall(SYS_sctp_generic_sendmsg, sd,
lib/libc/net/sctp_sys_calls.c
668
return (sendmsg(sd, &msg, flags));
lib/libc/net/sctp_sys_calls.c
675
sctp_sendx(int sd, const void *msg, size_t msg_len,
lib/libc/net/sctp_sys_calls.c
702
ret = syscall(SYS_sctp_generic_sendmsg, sd,
lib/libc/net/sctp_sys_calls.c
705
sinfo->sinfo_assoc_id = sctp_getassocid(sd, addrs);
lib/libc/net/sctp_sys_calls.c
742
ret = setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_DELAYED, (void *)buf,
lib/libc/net/sctp_sys_calls.c
75
int ret, sd;
lib/libc/net/sctp_sys_calls.c
758
sinfo->sinfo_assoc_id = sctp_getassocid(sd, addrs);
lib/libc/net/sctp_sys_calls.c
760
(void)setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_COMPLETE, (void *)addrs,
lib/libc/net/sctp_sys_calls.c
765
ret = sctp_send(sd, msg, msg_len, sinfo, flags);
lib/libc/net/sctp_sys_calls.c
768
(void)setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_COMPLETE, (void *)addrs,
lib/libc/net/sctp_sys_calls.c
776
sctp_sendmsgx(int sd,
lib/libc/net/sctp_sys_calls.c
795
return (sctp_sendx(sd, msg, len, addrs, addrcnt, &sinfo, 0));
lib/libc/net/sctp_sys_calls.c
82
sd = socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
lib/libc/net/sctp_sys_calls.c
84
sd = socket(AF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP);
lib/libc/net/sctp_sys_calls.c
86
sd = -1;
lib/libc/net/sctp_sys_calls.c
874
sctp_recvv(int sd,
lib/libc/net/sctp_sys_calls.c
88
if (sd == -1) {
lib/libc/net/sctp_sys_calls.c
91
ret = getsockopt(sd, IPPROTO_SCTP, SCTP_GET_ADDR_LEN, &av, &siz);
lib/libc/net/sctp_sys_calls.c
911
ret = recvmsg(sd, &msg, *flags);
lib/libc/net/sctp_sys_calls.c
92
close(sd);
lib/libc/net/sctp_sys_calls.c
967
sctp_sendv(int sd,
lib/libc/rpc/bindresvport.c
121
error = _getsockopt(sd, proto, portrange, &old, &oldlen);
lib/libc/rpc/bindresvport.c
125
error = _setsockopt(sd, proto, portrange, &portlow,
lib/libc/rpc/bindresvport.c
131
error = _bind(sd, sa, salen);
lib/libc/rpc/bindresvport.c
137
if (_setsockopt(sd, proto, portrange, &old,
lib/libc/rpc/bindresvport.c
145
if (_getsockname(sd, sa, &salen) < 0)
lib/libc/rpc/bindresvport.c
59
bindresvport(int sd, struct sockaddr_in *sin)
lib/libc/rpc/bindresvport.c
61
return bindresvport_sa(sd, (struct sockaddr *)sin);
lib/libc/rpc/bindresvport.c
68
bindresvport_sa(int sd, struct sockaddr *sa)
lib/libc/rpc/bindresvport.c
84
if (_getsockname(sd, sa, &salen) == -1)
lib/libcasper/services/cap_net/tests/net_test.c
283
int sd;
lib/libcasper/services/cap_net/tests/net_test.c
290
sd = socket(AF_INET, SOCK_STREAM, 0);
lib/libcasper/services/cap_net/tests/net_test.c
291
ATF_REQUIRE(sd >= 0);
lib/libcasper/services/cap_net/tests/net_test.c
297
ret = connect(sd, (struct sockaddr *)&ipv4, sizeof(ipv4));
lib/libcasper/services/cap_net/tests/net_test.c
301
ATF_REQUIRE(close(sd) == 0);
lib/libfetch/common.c
1200
SSL_set_fd(conn->ssl, conn->sd);
lib/libfetch/common.c
1283
fetch_socket_read(int sd, char *buf, size_t len)
lib/libfetch/common.c
1287
rlen = read(sd, buf, len);
lib/libfetch/common.c
1316
pfd.fd = conn->sd;
lib/libfetch/common.c
1344
rlen = fetch_socket_read(conn->sd, buf, len);
lib/libfetch/common.c
1452
pfd.fd = conn->sd;
lib/libfetch/common.c
1488
wlen = writev(conn->sd, iov, iovcnt);
lib/libfetch/common.c
1566
ret = close(conn->sd);
lib/libfetch/common.c
281
fetch_reopen(int sd)
lib/libfetch/common.c
290
flags = fcntl(sd, F_GETFD);
lib/libfetch/common.c
292
(void)fcntl(sd, F_SETFD, flags | FD_CLOEXEC);
lib/libfetch/common.c
293
flags = fcntl(sd, F_GETFL);
lib/libfetch/common.c
295
(void)fcntl(sd, F_SETFL, flags | O_NONBLOCK);
lib/libfetch/common.c
296
(void)setsockopt(sd, SOL_SOCKET, SO_NOSIGPIPE, &opt, sizeof(opt));
lib/libfetch/common.c
297
conn->sd = sd;
lib/libfetch/common.c
390
fetch_bind(int sd, int af, const char *addr)
lib/libfetch/common.c
398
if ((err = bind(sd, ai->ai_addr, ai->ai_addrlen)) == 0)
lib/libfetch/common.c
599
int err = 0, sd = -1;
lib/libfetch/common.c
640
if ((sd = socket(sai->ai_family, SOCK_STREAM, 0)) < 0) {
lib/libfetch/common.c
650
if ((err = bind(sd, cai->ai_addr, cai->ai_addrlen)) == 0)
lib/libfetch/common.c
658
while ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) < 0) {
lib/libfetch/common.c
667
close(sd);
lib/libfetch/common.c
668
sd = -1;
lib/libfetch/common.c
683
if ((conn = fetch_reopen(sd)) == NULL)
lib/libfetch/common.c
702
else if (sd >= 0)
lib/libfetch/common.c
703
close(sd);
lib/libfetch/common.h
50
int sd; /* socket descriptor */
lib/libfetch/ftp.c
628
int e, sd = -1;
lib/libfetch/ftp.c
651
if (getsockname(conn->sd, (struct sockaddr *)&sa, &l) == -1)
lib/libfetch/ftp.c
657
if ((sd = socket(sa.ss_family, SOCK_STREAM, IPPROTO_TCP)) == -1) {
lib/libfetch/ftp.c
740
if (getpeername(conn->sd, (struct sockaddr *)&sa, &l) == -1)
lib/libfetch/ftp.c
773
(e = fetch_bind(sd, sa.ss_family, bindaddr)) != 0)
lib/libfetch/ftp.c
775
if (connect(sd, (struct sockaddr *)&sa, sa.ss_len) == -1)
lib/libfetch/ftp.c
797
if (setsockopt(sd, IPPROTO_IPV6, IPV6_PORTRANGE,
lib/libfetch/ftp.c
805
if (setsockopt(sd, IPPROTO_IP, IP_PORTRANGE,
lib/libfetch/ftp.c
812
if (bind(sd, (struct sockaddr *)&sa, sa.ss_len) == -1)
lib/libfetch/ftp.c
814
if (listen(sd, 1) == -1)
lib/libfetch/ftp.c
818
if (getsockname(sd, (struct sockaddr *)&sa, &l) == -1)
lib/libfetch/ftp.c
877
if ((d = accept(sd, NULL, NULL)) == -1)
lib/libfetch/ftp.c
879
close(sd);
lib/libfetch/ftp.c
880
sd = d;
lib/libfetch/ftp.c
883
if ((df = ftp_setup(conn, fetch_reopen(sd), mode)) == NULL)
lib/libfetch/ftp.c
889
if (sd >= 0)
lib/libfetch/ftp.c
890
close(sd);
lib/libfetch/ftp.c
896
if (sd >= 0)
lib/libfetch/ftp.c
897
close(sd);
lib/libfetch/http.c
1487
setsockopt(conn->sd, IPPROTO_TCP, TCP_NOPUSH, &val, sizeof(val));
lib/libfetch/http.c
1791
setsockopt(conn->sd, IPPROTO_TCP, TCP_NOPUSH, &val,
lib/libfetch/http.c
1794
setsockopt(conn->sd, IPPROTO_TCP, TCP_NODELAY, &val,
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
203
struct _citrus_iconv_std_dst *sd;
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
205
while ((sd = TAILQ_FIRST(dl)) != NULL) {
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
206
TAILQ_REMOVE(dl, sd, sd_entry);
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
207
_csmapper_close(sd->sd_mapper);
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
208
free(sd);
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
216
struct _citrus_iconv_std_dst *sd, *sdtmp;
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
220
sd = malloc(sizeof(*sd));
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
221
if (sd == NULL)
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
225
ret = open_csmapper(&sd->sd_mapper, ec->ec_csname,
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
228
sd->sd_csid = dbdst->db_charsets[i].ec_csid;
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
229
sd->sd_norm = norm;
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
233
TAILQ_INSERT_BEFORE(sdtmp, sd,
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
235
sd = NULL;
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
239
if (sd)
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
240
TAILQ_INSERT_TAIL(dl, sd, sd_entry);
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
241
sd = malloc(sizeof(*sd));
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
242
if (sd == NULL) {
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
249
free(sd);
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
253
free(sd);
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
315
struct _citrus_iconv_std_dst *sd;
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
322
TAILQ_FOREACH(sd, &ss->ss_dsts, sd_entry) {
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
323
ret = _csmapper_convert(sd->sd_mapper,
lib/libiconv_modules/iconv_std/citrus_iconv_std.c
327
*csid = sd->sd_csid;
lib/libmt/mtlib.c
668
struct densities *sd;
lib/libmt/mtlib.c
676
for (sd = dens; sd->dens != 0; sd++)
lib/libmt/mtlib.c
677
if (sd->dens == density_num)
lib/libmt/mtlib.c
679
if (sd->dens == 0)
lib/libmt/mtlib.c
681
return (sd->name);
lib/libmt/mtlib.c
691
struct densities *sd;
lib/libmt/mtlib.c
693
for (sd = dens; sd->dens; sd++)
lib/libmt/mtlib.c
694
if (sd->dens == density_num)
lib/libmt/mtlib.c
696
if (sd->dens == 0)
lib/libmt/mtlib.c
699
return (sd->bpi);
lib/libmt/mtlib.c
701
return (sd->bpmm);
lib/libmt/mtlib.c
707
struct densities *sd;
lib/libmt/mtlib.c
710
for (sd = dens; sd->dens; sd++)
lib/libmt/mtlib.c
711
if (strncasecmp(sd->name, density_name, l) == 0)
lib/libmt/mtlib.c
713
return (sd->dens);
lib/libsys/_libsys.h
765
int __sys_sctp_peeloff(int sd, uint32_t name);
lib/libsys/_libsys.h
766
int __sys_sctp_generic_sendmsg(int sd, void * msg, int mlen, const struct sockaddr * to, __socklen_t tolen, struct sctp_sndrcvinfo * sinfo, int flags);
lib/libsys/_libsys.h
767
int __sys_sctp_generic_sendmsg_iov(int sd, struct iovec * iov, int iovlen, const struct sockaddr * to, __socklen_t tolen, struct sctp_sndrcvinfo * sinfo, int flags);
lib/libsys/_libsys.h
768
int __sys_sctp_generic_recvmsg(int sd, struct iovec * iov, int iovlen, struct sockaddr * from, __socklen_t * fromlenaddr, struct sctp_sndrcvinfo * sinfo, int * msg_flags);
libexec/phttpget/phttpget.c
220
readln(int sd, char * resbuf, int * resbuflen, int * resbufpos)
libexec/phttpget/phttpget.c
239
len = recv(sd, resbuf + *resbuflen, BUFSIZ - *resbuflen, 0);
libexec/phttpget/phttpget.c
252
copybytes(int sd, int fd, off_t copylen, char * resbuf, int * resbuflen,
libexec/phttpget/phttpget.c
273
len = recv(sd, resbuf, BUFSIZ, 0);
libexec/phttpget/phttpget.c
310
int sd = -1; /* Socket descriptor */
libexec/phttpget/phttpget.c
356
for (; sd == -1; res = res->ai_next) {
libexec/phttpget/phttpget.c
362
sd = socket(res->ai_family, res->ai_socktype,
libexec/phttpget/phttpget.c
364
if (sd == -1)
libexec/phttpget/phttpget.c
368
setsockopt(sd, SOL_SOCKET, SO_SNDTIMEO,
libexec/phttpget/phttpget.c
370
setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO,
libexec/phttpget/phttpget.c
375
setsockopt(sd, SOL_SOCKET, SO_NOSIGPIPE,
libexec/phttpget/phttpget.c
379
if(connect(sd, res->ai_addr, res->ai_addrlen)) {
libexec/phttpget/phttpget.c
380
close(sd);
libexec/phttpget/phttpget.c
381
sd = -1;
libexec/phttpget/phttpget.c
394
sdflags = fcntl(sd, F_GETFL);
libexec/phttpget/phttpget.c
395
if (fcntl(sd, F_SETFL, sdflags | O_NONBLOCK) == -1)
libexec/phttpget/phttpget.c
411
len = send(sd, reqbuf + reqbufpos,
libexec/phttpget/phttpget.c
431
if (fcntl(sd, F_SETFL, sdflags) == -1)
libexec/phttpget/phttpget.c
438
len = send(sd, reqbuf + reqbufpos,
libexec/phttpget/phttpget.c
456
error = readln(sd, resbuf, &resbuflen, &resbufpos);
libexec/phttpget/phttpget.c
608
error = readln(sd, resbuf, &resbuflen,
libexec/phttpget/phttpget.c
630
error = copybytes(sd, fd, clen, resbuf,
libexec/phttpget/phttpget.c
639
error = readln(sd, resbuf, &resbuflen,
libexec/phttpget/phttpget.c
648
error = copybytes(sd, fd, contentlength, resbuf,
libexec/phttpget/phttpget.c
658
error = copybytes(sd, fd, OFF_MAX, resbuf,
libexec/phttpget/phttpget.c
707
shutdown(sd, SHUT_RDWR);
libexec/phttpget/phttpget.c
708
close(sd);
libexec/phttpget/phttpget.c
709
sd = -1;
sys/amd64/amd64/machdep.c
590
sdtossd(struct user_segment_descriptor *sd, struct soft_segment_descriptor *ssd)
sys/amd64/amd64/machdep.c
593
ssd->ssd_base = (sd->sd_hibase << 24) | sd->sd_lobase;
sys/amd64/amd64/machdep.c
594
ssd->ssd_limit = (sd->sd_hilimit << 16) | sd->sd_lolimit;
sys/amd64/amd64/machdep.c
595
ssd->ssd_type = sd->sd_type;
sys/amd64/amd64/machdep.c
596
ssd->ssd_dpl = sd->sd_dpl;
sys/amd64/amd64/machdep.c
597
ssd->ssd_p = sd->sd_p;
sys/amd64/amd64/machdep.c
598
ssd->ssd_long = sd->sd_long;
sys/amd64/amd64/machdep.c
599
ssd->ssd_def32 = sd->sd_def32;
sys/amd64/amd64/machdep.c
600
ssd->ssd_gran = sd->sd_gran;
sys/amd64/amd64/machdep.c
604
ssdtosd(struct soft_segment_descriptor *ssd, struct user_segment_descriptor *sd)
sys/amd64/amd64/machdep.c
607
sd->sd_lobase = (ssd->ssd_base) & 0xffffff;
sys/amd64/amd64/machdep.c
608
sd->sd_hibase = (ssd->ssd_base >> 24) & 0xff;
sys/amd64/amd64/machdep.c
609
sd->sd_lolimit = (ssd->ssd_limit) & 0xffff;
sys/amd64/amd64/machdep.c
610
sd->sd_hilimit = (ssd->ssd_limit >> 16) & 0xf;
sys/amd64/amd64/machdep.c
611
sd->sd_type = ssd->ssd_type;
sys/amd64/amd64/machdep.c
612
sd->sd_dpl = ssd->ssd_dpl;
sys/amd64/amd64/machdep.c
613
sd->sd_p = ssd->ssd_p;
sys/amd64/amd64/machdep.c
614
sd->sd_long = ssd->ssd_long;
sys/amd64/amd64/machdep.c
615
sd->sd_def32 = ssd->ssd_def32;
sys/amd64/amd64/machdep.c
616
sd->sd_gran = ssd->ssd_gran;
sys/amd64/amd64/machdep.c
620
ssdtosyssd(struct soft_segment_descriptor *ssd, struct system_segment_descriptor *sd)
sys/amd64/amd64/machdep.c
623
sd->sd_lobase = (ssd->ssd_base) & 0xffffff;
sys/amd64/amd64/machdep.c
624
sd->sd_hibase = (ssd->ssd_base >> 24) & 0xfffffffffful;
sys/amd64/amd64/machdep.c
625
sd->sd_lolimit = (ssd->ssd_limit) & 0xffff;
sys/amd64/amd64/machdep.c
626
sd->sd_hilimit = (ssd->ssd_limit >> 16) & 0xf;
sys/amd64/amd64/machdep.c
627
sd->sd_type = ssd->ssd_type;
sys/amd64/amd64/machdep.c
628
sd->sd_dpl = ssd->ssd_dpl;
sys/amd64/amd64/machdep.c
629
sd->sd_p = ssd->ssd_p;
sys/amd64/amd64/machdep.c
630
sd->sd_gran = ssd->ssd_gran;
sys/amd64/amd64/sys_machdep.c
144
struct user_segment_descriptor *sd;
sys/amd64/amd64/sys_machdep.c
150
sd = PCPU_GET(gs32p);
sys/amd64/amd64/sys_machdep.c
151
sd->sd_lobase = base & 0xffffff;
sys/amd64/amd64/sys_machdep.c
152
sd->sd_hibase = (base >> 24) & 0xff;
sys/amd64/amd64/sys_machdep.c
159
struct user_segment_descriptor *sd;
sys/amd64/amd64/sys_machdep.c
165
sd = PCPU_GET(fs32p);
sys/amd64/amd64/sys_machdep.c
166
sd->sd_lobase = base & 0xffffff;
sys/amd64/amd64/sys_machdep.c
167
sd->sd_hibase = (base >> 24) & 0xff;
sys/arm/mv/gpio.c
691
struct mv_gpio_pindev *sd;
sys/arm/mv/gpio.c
708
sd = (struct mv_gpio_pindev *)malloc(sizeof(struct mv_gpio_pindev),
sys/arm/mv/gpio.c
710
if (sd == NULL) {
sys/arm/mv/gpio.c
714
sd->pin = pin;
sys/arm/mv/gpio.c
715
sd->dev = dev;
sys/arm/mv/gpio.c
717
callout_reset(c, DEBOUNCE_CHECK_TICKS, mv_gpio_debounce, sd);
sys/cam/cam_iosched.c
2047
iop->sd = (sbintime_t)isqrt64((uint64_t)iop->emvar) << 12;
sys/cam/cam_iosched.c
274
sbintime_t sd; /* Last computed sd */
sys/compat/freebsd32/freebsd32_misc.c
3622
syscall32_helper_register(struct syscall_helper_data *sd, int flags)
sys/compat/freebsd32/freebsd32_misc.c
3625
return (kern_syscall_helper_register(freebsd32_sysent, sd, flags));
sys/compat/freebsd32/freebsd32_misc.c
3629
syscall32_helper_unregister(struct syscall_helper_data *sd)
sys/compat/freebsd32/freebsd32_misc.c
3632
return (kern_syscall_helper_unregister(freebsd32_sysent, sd));
sys/compat/freebsd32/freebsd32_systrace_args.c
2290
iarg[a++] = p->sd; /* int */
sys/compat/freebsd32/freebsd32_systrace_args.c
2298
iarg[a++] = p->sd; /* int */
sys/compat/freebsd32/freebsd32_systrace_args.c
2311
iarg[a++] = p->sd; /* int */
sys/compat/freebsd32/freebsd32_systrace_args.c
2324
iarg[a++] = p->sd; /* int */
sys/compat/freebsd32/freebsd32_util.h
108
int syscall32_helper_register(struct syscall_helper_data *sd, int flags);
sys/compat/freebsd32/freebsd32_util.h
109
int syscall32_helper_unregister(struct syscall_helper_data *sd);
sys/compat/linuxkpi/common/include/linux/socket.h
37
kernel_connect(int sd, struct sockaddr *sa, size_t salen, int flags)
sys/ddb/db_ctf.c
215
db_ctf_typeid_to_type(db_ctf_sym_data_t sd, uint32_t typeid)
sys/ddb/db_ctf.c
217
const ctf_header_t *hp = db_ctf_fetch_cth(&sd->lc);
sys/ddb/db_ctf.c
250
db_ctf_stroff_to_str(db_ctf_sym_data_t sd, uint32_t off)
sys/ddb/db_ctf.c
252
const ctf_header_t *hp = db_ctf_fetch_cth(&sd->lc);
sys/ddb/db_ctf.c
271
db_ctf_sym_to_type(db_ctf_sym_data_t sd)
sys/ddb/db_ctf.c
276
if (sd->sym == NULL) {
sys/ddb/db_ctf.c
279
symtab = sd->lc.symtab;
sys/ddb/db_ctf.c
280
symtab_end = symtab + sd->lc.nsym;
sys/ddb/db_ctf.c
282
objtoff = sym_to_objtoff(&sd->lc, sd->sym, symtab, symtab_end);
sys/ddb/db_ctf.c
290
const uint32_t *)(sd->lc.ctftab + sizeof(ctf_header_t) + objtoff);
sys/ddb/db_ctf.c
292
return (db_ctf_typeid_to_type(sd, typeid));
sys/ddb/db_ctf.c
299
db_ctf_find_symbol(const char *name, db_ctf_sym_data_t sd)
sys/ddb/db_ctf.c
304
error = linker_ctf_lookup_sym_ddb(name, &lsym, &sd->lc);
sys/ddb/db_ctf.c
311
sd->sym = __DECONST(Elf_Sym *, lsym);
sys/ddb/db_ctf.c
320
db_ctf_find_typename(db_ctf_sym_data_t sd, const char *typename)
sys/ddb/db_ctf.c
322
if (linker_ctf_lookup_typename_ddb(&sd->lc, typename) != 0) {
sys/ddb/db_ctf.c
325
return (db_ctf_typename_to_type(&sd->lc, typename));
sys/ddb/db_ctf.h
50
int db_ctf_find_symbol(const char *name, db_ctf_sym_data_t sd);
sys/ddb/db_ctf.h
51
struct ctf_type_v3 *db_ctf_find_typename(db_ctf_sym_data_t sd,
sys/ddb/db_ctf.h
58
struct ctf_type_v3 *db_ctf_sym_to_type(db_ctf_sym_data_t sd);
sys/ddb/db_ctf.h
59
const char *db_ctf_stroff_to_str(db_ctf_sym_data_t sd, uint32_t off);
sys/ddb/db_ctf.h
61
struct ctf_type_v3 *db_ctf_typeid_to_type(db_ctf_sym_data_t sd,
sys/dev/aic7xxx/aic7770.c
294
struct seeprom_descriptor sd;
sys/dev/aic7xxx/aic7770.c
299
sd.sd_ahc = ahc;
sys/dev/aic7xxx/aic7770.c
300
sd.sd_control_offset = SEECTL_2840;
sys/dev/aic7xxx/aic7770.c
301
sd.sd_status_offset = STATUS_2840;
sys/dev/aic7xxx/aic7770.c
302
sd.sd_dataout_offset = STATUS_2840;
sys/dev/aic7xxx/aic7770.c
303
sd.sd_chip = C46;
sys/dev/aic7xxx/aic7770.c
304
sd.sd_MS = 0;
sys/dev/aic7xxx/aic7770.c
305
sd.sd_RDY = EEPROM_TF;
sys/dev/aic7xxx/aic7770.c
306
sd.sd_CS = CS_2840;
sys/dev/aic7xxx/aic7770.c
307
sd.sd_CK = CK_2840;
sys/dev/aic7xxx/aic7770.c
308
sd.sd_DO = DO_2840;
sys/dev/aic7xxx/aic7770.c
309
sd.sd_DI = DI_2840;
sys/dev/aic7xxx/aic7770.c
314
have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc,
sys/dev/aic7xxx/aic7xxx.h
1372
struct seeprom_descriptor *sd);
sys/dev/aic7xxx/aic7xxx.h
1373
void ahc_release_seeprom(struct seeprom_descriptor *sd);
sys/dev/aic7xxx/aic7xxx_93cx6.c
105
send_seeprom_cmd(struct seeprom_descriptor *sd, struct seeprom_cmd *cmd)
sys/dev/aic7xxx/aic7xxx_93cx6.c
111
temp = sd->sd_MS ^ sd->sd_CS;
sys/dev/aic7xxx/aic7xxx_93cx6.c
112
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sys/dev/aic7xxx/aic7xxx_93cx6.c
113
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
117
temp ^= sd->sd_DO;
sys/dev/aic7xxx/aic7xxx_93cx6.c
118
SEEPROM_OUTB(sd, temp);
sys/dev/aic7xxx/aic7xxx_93cx6.c
119
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
120
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sys/dev/aic7xxx/aic7xxx_93cx6.c
121
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
123
temp ^= sd->sd_DO;
sys/dev/aic7xxx/aic7xxx_93cx6.c
131
reset_seeprom(struct seeprom_descriptor *sd)
sys/dev/aic7xxx/aic7xxx_93cx6.c
135
temp = sd->sd_MS;
sys/dev/aic7xxx/aic7xxx_93cx6.c
136
SEEPROM_OUTB(sd, temp);
sys/dev/aic7xxx/aic7xxx_93cx6.c
137
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
138
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sys/dev/aic7xxx/aic7xxx_93cx6.c
139
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
140
SEEPROM_OUTB(sd, temp);
sys/dev/aic7xxx/aic7xxx_93cx6.c
141
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
149
ahc_read_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
sys/dev/aic7xxx/aic7xxx_93cx6.c
166
send_seeprom_cmd(sd, &seeprom_read);
sys/dev/aic7xxx/aic7xxx_93cx6.c
169
temp = sd->sd_MS ^ sd->sd_CS;
sys/dev/aic7xxx/aic7xxx_93cx6.c
170
for (i = (sd->sd_chip - 1); i >= 0; i--) {
sys/dev/aic7xxx/aic7xxx_93cx6.c
172
temp ^= sd->sd_DO;
sys/dev/aic7xxx/aic7xxx_93cx6.c
173
SEEPROM_OUTB(sd, temp);
sys/dev/aic7xxx/aic7xxx_93cx6.c
174
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
175
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sys/dev/aic7xxx/aic7xxx_93cx6.c
176
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
178
temp ^= sd->sd_DO;
sys/dev/aic7xxx/aic7xxx_93cx6.c
189
SEEPROM_OUTB(sd, temp);
sys/dev/aic7xxx/aic7xxx_93cx6.c
190
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
192
if (SEEPROM_DATA_INB(sd) & sd->sd_DI)
sys/dev/aic7xxx/aic7xxx_93cx6.c
194
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sys/dev/aic7xxx/aic7xxx_93cx6.c
195
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
201
reset_seeprom(sd);
sys/dev/aic7xxx/aic7xxx_93cx6.c
221
ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
sys/dev/aic7xxx/aic7xxx_93cx6.c
230
if (sd->sd_chip == C46) {
sys/dev/aic7xxx/aic7xxx_93cx6.c
233
} else if (sd->sd_chip == C56_66) {
sys/dev/aic7xxx/aic7xxx_93cx6.c
238
sd->sd_chip);
sys/dev/aic7xxx/aic7xxx_93cx6.c
242
send_seeprom_cmd(sd, ewen);
sys/dev/aic7xxx/aic7xxx_93cx6.c
243
reset_seeprom(sd);
sys/dev/aic7xxx/aic7xxx_93cx6.c
246
temp = sd->sd_MS ^ sd->sd_CS;
sys/dev/aic7xxx/aic7xxx_93cx6.c
249
send_seeprom_cmd(sd, &seeprom_write);
sys/dev/aic7xxx/aic7xxx_93cx6.c
252
for (i = (sd->sd_chip - 1); i >= 0; i--) {
sys/dev/aic7xxx/aic7xxx_93cx6.c
254
temp ^= sd->sd_DO;
sys/dev/aic7xxx/aic7xxx_93cx6.c
255
SEEPROM_OUTB(sd, temp);
sys/dev/aic7xxx/aic7xxx_93cx6.c
256
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
257
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sys/dev/aic7xxx/aic7xxx_93cx6.c
258
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
260
temp ^= sd->sd_DO;
sys/dev/aic7xxx/aic7xxx_93cx6.c
267
temp ^= sd->sd_DO;
sys/dev/aic7xxx/aic7xxx_93cx6.c
268
SEEPROM_OUTB(sd, temp);
sys/dev/aic7xxx/aic7xxx_93cx6.c
269
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
270
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sys/dev/aic7xxx/aic7xxx_93cx6.c
271
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
273
temp ^= sd->sd_DO;
sys/dev/aic7xxx/aic7xxx_93cx6.c
277
temp = sd->sd_MS;
sys/dev/aic7xxx/aic7xxx_93cx6.c
278
SEEPROM_OUTB(sd, temp);
sys/dev/aic7xxx/aic7xxx_93cx6.c
279
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
280
temp = sd->sd_MS ^ sd->sd_CS;
sys/dev/aic7xxx/aic7xxx_93cx6.c
282
SEEPROM_OUTB(sd, temp);
sys/dev/aic7xxx/aic7xxx_93cx6.c
283
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
284
SEEPROM_OUTB(sd, temp ^ sd->sd_CK);
sys/dev/aic7xxx/aic7xxx_93cx6.c
285
CLOCK_PULSE(sd, sd->sd_RDY);
sys/dev/aic7xxx/aic7xxx_93cx6.c
286
} while ((SEEPROM_DATA_INB(sd) & sd->sd_DI) == 0);
sys/dev/aic7xxx/aic7xxx_93cx6.c
288
reset_seeprom(sd);
sys/dev/aic7xxx/aic7xxx_93cx6.c
292
send_seeprom_cmd(sd, ewds);
sys/dev/aic7xxx/aic7xxx_93cx6.c
293
reset_seeprom(sd);
sys/dev/aic7xxx/aic7xxx_93cx6.c
95
#define CLOCK_PULSE(sd, rdy) \
sys/dev/aic7xxx/aic7xxx_93cx6.c
96
while ((SEEPROM_STATUS_INB(sd) & rdy) == 0) { \
sys/dev/aic7xxx/aic7xxx_93cx6.c
99
(void)SEEPROM_INB(sd); /* Clear clock */
sys/dev/aic7xxx/aic7xxx_93cx6.h
83
#define SEEPROM_INB(sd) \
sys/dev/aic7xxx/aic7xxx_93cx6.h
84
ahc_inb(sd->sd_ahc, sd->sd_control_offset)
sys/dev/aic7xxx/aic7xxx_93cx6.h
85
#define SEEPROM_OUTB(sd, value) \
sys/dev/aic7xxx/aic7xxx_93cx6.h
87
ahc_outb(sd->sd_ahc, sd->sd_control_offset, value); \
sys/dev/aic7xxx/aic7xxx_93cx6.h
88
ahc_flush_device_writes(sd->sd_ahc); \
sys/dev/aic7xxx/aic7xxx_93cx6.h
91
#define SEEPROM_STATUS_INB(sd) \
sys/dev/aic7xxx/aic7xxx_93cx6.h
92
ahc_inb(sd->sd_ahc, sd->sd_status_offset)
sys/dev/aic7xxx/aic7xxx_93cx6.h
93
#define SEEPROM_DATA_INB(sd) \
sys/dev/aic7xxx/aic7xxx_93cx6.h
94
ahc_inb(sd->sd_ahc, sd->sd_dataout_offset)
sys/dev/aic7xxx/aic7xxx_93cx6.h
96
int ahc_read_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
sys/dev/aic7xxx/aic7xxx_93cx6.h
98
int ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf,
sys/dev/aic7xxx/aic7xxx_pci.c
1337
struct seeprom_descriptor sd;
sys/dev/aic7xxx/aic7xxx_pci.c
1342
sd.sd_ahc = ahc;
sys/dev/aic7xxx/aic7xxx_pci.c
1343
sd.sd_control_offset = SEECTL;
sys/dev/aic7xxx/aic7xxx_pci.c
1344
sd.sd_status_offset = SEECTL;
sys/dev/aic7xxx/aic7xxx_pci.c
1345
sd.sd_dataout_offset = SEECTL;
sys/dev/aic7xxx/aic7xxx_pci.c
1355
sd.sd_chip = C56_66;
sys/dev/aic7xxx/aic7xxx_pci.c
1357
sd.sd_chip = C46;
sys/dev/aic7xxx/aic7xxx_pci.c
1359
sd.sd_MS = SEEMS;
sys/dev/aic7xxx/aic7xxx_pci.c
1360
sd.sd_RDY = SEERDY;
sys/dev/aic7xxx/aic7xxx_pci.c
1361
sd.sd_CS = SEECS;
sys/dev/aic7xxx/aic7xxx_pci.c
1362
sd.sd_CK = SEECK;
sys/dev/aic7xxx/aic7xxx_pci.c
1363
sd.sd_DO = SEEDO;
sys/dev/aic7xxx/aic7xxx_pci.c
1364
sd.sd_DI = SEEDI;
sys/dev/aic7xxx/aic7xxx_pci.c
1366
have_seeprom = ahc_acquire_seeprom(ahc, &sd);
sys/dev/aic7xxx/aic7xxx_pci.c
1376
have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc,
sys/dev/aic7xxx/aic7xxx_pci.c
1383
if (have_seeprom != 0 || sd.sd_chip == C56_66) {
sys/dev/aic7xxx/aic7xxx_pci.c
1392
sd.sd_chip = C56_66;
sys/dev/aic7xxx/aic7xxx_pci.c
1394
ahc_release_seeprom(&sd);
sys/dev/aic7xxx/aic7xxx_pci.c
1397
if (sd.sd_chip == C56_66)
sys/dev/aic7xxx/aic7xxx_pci.c
1468
ahc_acquire_seeprom(ahc, &sd);
sys/dev/aic7xxx/aic7xxx_pci.c
1469
configure_termination(ahc, &sd, sc->adapter_control, sxfrctl1);
sys/dev/aic7xxx/aic7xxx_pci.c
1470
ahc_release_seeprom(&sd);
sys/dev/aic7xxx/aic7xxx_pci.c
1602
struct seeprom_descriptor *sd,
sys/dev/aic7xxx/aic7xxx_pci.c
1621
SEEPROM_OUTB(sd, sd->sd_MS | sd->sd_CS);
sys/dev/aic7xxx/aic7xxx_pci.c
1823
SEEPROM_OUTB(sd, sd->sd_MS); /* Clear CS */
sys/dev/aic7xxx/aic7xxx_pci.c
1913
ahc_acquire_seeprom(struct ahc_softc *ahc, struct seeprom_descriptor *sd)
sys/dev/aic7xxx/aic7xxx_pci.c
1928
SEEPROM_OUTB(sd, sd->sd_MS);
sys/dev/aic7xxx/aic7xxx_pci.c
1930
while (--wait && ((SEEPROM_STATUS_INB(sd) & sd->sd_RDY) == 0)) {
sys/dev/aic7xxx/aic7xxx_pci.c
1933
if ((SEEPROM_STATUS_INB(sd) & sd->sd_RDY) == 0) {
sys/dev/aic7xxx/aic7xxx_pci.c
1934
SEEPROM_OUTB(sd, 0);
sys/dev/aic7xxx/aic7xxx_pci.c
1941
ahc_release_seeprom(struct seeprom_descriptor *sd)
sys/dev/aic7xxx/aic7xxx_pci.c
1944
SEEPROM_OUTB(sd, 0);
sys/dev/aic7xxx/aic7xxx_pci.c
2125
struct seeprom_descriptor sd;
sys/dev/aic7xxx/aic7xxx_pci.c
2128
sd.sd_ahc = ahc;
sys/dev/aic7xxx/aic7xxx_pci.c
2129
sd.sd_control_offset = SEECTL;
sys/dev/aic7xxx/aic7xxx_pci.c
2130
sd.sd_status_offset = SEECTL;
sys/dev/aic7xxx/aic7xxx_pci.c
2131
sd.sd_dataout_offset = SEECTL;
sys/dev/aic7xxx/aic7xxx_pci.c
2133
ahc_acquire_seeprom(ahc, &sd);
sys/dev/aic7xxx/aic7xxx_pci.c
2134
configure_termination(ahc, &sd,
sys/dev/aic7xxx/aic7xxx_pci.c
2137
ahc_release_seeprom(&sd);
sys/dev/aic7xxx/aic7xxx_pci.c
680
struct seeprom_descriptor *sd,
sys/dev/ath/if_ath_pci.c
86
#define PCI_DEVICE_SUB(v, d, sv, sd) \
sys/dev/ath/if_ath_pci.c
87
PCI_DEV(v, d), PCI_SUBDEV(sv, sd)
sys/dev/cxgb/cxgb_sge.c
2680
struct rx_sw_desc *sd = &fl->sdesc[cidx];
sys/dev/cxgb/cxgb_sge.c
2695
bus_dmamap_sync(fl->entry_tag, sd->map, BUS_DMASYNC_POSTREAD);
sys/dev/cxgb/cxgb_sge.c
2702
memcpy(cl, sd->rxsd_cl, len);
sys/dev/cxgb/cxgb_sge.c
2711
bus_dmamap_unload(fl->entry_tag, sd->map);
sys/dev/cxgb/cxgb_sge.c
2712
cl = sd->rxsd_cl;
sys/dev/cxgb/cxgb_sge.c
2713
m = sd->m;
sys/dev/cxgb/cxgb_sge.c
705
struct rx_sw_desc *sd = &q->sdesc[q->pidx];
sys/dev/cxgb/cxgb_sge.c
730
if ((sd->flags & RX_SW_DESC_MAP_CREATED) == 0) {
sys/dev/cxgb/cxgb_sge.c
731
if ((err = bus_dmamap_create(q->entry_tag, 0, &sd->map))) {
sys/dev/cxgb/cxgb_sge.c
736
sd->flags |= RX_SW_DESC_MAP_CREATED;
sys/dev/cxgb/cxgb_sge.c
739
err = bus_dmamap_load(q->entry_tag, sd->map,
sys/dev/cxgb/cxgb_sge.c
751
sd->flags |= RX_SW_DESC_INUSE;
sys/dev/cxgb/cxgb_sge.c
752
sd->rxsd_cl = cl;
sys/dev/cxgb/cxgb_sge.c
753
sd->m = m;
sys/dev/cxgb/cxgb_sge.c
760
sd++;
sys/dev/cxgb/cxgb_sge.c
765
sd = q->sdesc;
sys/dev/cxgbe/t4_sge.c
1764
cl_metadata(struct fl_sdesc *sd)
sys/dev/cxgbe/t4_sge.c
1767
return ((void *)(sd->cl + sd->moff));
sys/dev/cxgbe/t4_sge.c
1791
struct fl_sdesc *sd = &fl->sdesc[fl->cidx];
sys/dev/cxgbe/t4_sge.c
1792
struct rx_buf_info *rxb = &sc->sge.rx_buf_info[sd->zidx];
sys/dev/cxgbe/t4_sge.c
1802
payload = sd->cl + fl->rx_offset;
sys/dev/cxgbe/t4_sge.c
1813
payload = sd->cl;
sys/dev/cxgbe/t4_sge.c
1839
clm = cl_metadata(sd);
sys/dev/cxgbe/t4_sge.c
1840
if (sd->nmbuf++ == 0) {
sys/dev/cxgbe/t4_sge.c
1843
clm->cl = sd->cl;
sys/dev/cxgbe/t4_sge.c
1854
m_cljset(m, sd->cl, rxb->type);
sys/dev/cxgbe/t4_sge.c
1855
sd->cl = NULL; /* consumed, not a recycle candidate */
sys/dev/cxgbe/t4_sge.c
1916
struct fl_sdesc *sd = &fl->sdesc[fl->cidx];
sys/dev/cxgbe/t4_sge.c
1917
struct rx_buf_info *rxb = &sc->sge.rx_buf_info[sd->zidx];
sys/dev/cxgbe/t4_sge.c
1961
struct fl_sdesc *sd = &fl->sdesc[fl->cidx];
sys/dev/cxgbe/t4_sge.c
1962
struct rx_buf_info *rxb = &sc->sge.rx_buf_info[sd->zidx];
sys/dev/cxgbe/t4_sge.c
2116
struct fl_sdesc *sd = &fl->sdesc[fl->cidx];
sys/dev/cxgbe/t4_sge.c
2120
frame = sd->cl + fl->rx_offset + fl_pktshift;
sys/dev/cxgbe/t4_sge.c
5170
struct fl_sdesc *sd;
sys/dev/cxgbe/t4_sge.c
5190
sd = &fl->sdesc[fl->pidx];
sys/dev/cxgbe/t4_sge.c
5195
if (sd->cl != NULL) {
sys/dev/cxgbe/t4_sge.c
5197
if (sd->nmbuf == 0) {
sys/dev/cxgbe/t4_sge.c
5214
clm = cl_metadata(sd);
sys/dev/cxgbe/t4_sge.c
5222
sd->cl = NULL; /* gave up my reference */
sys/dev/cxgbe/t4_sge.c
5224
MPASS(sd->cl == NULL);
sys/dev/cxgbe/t4_sge.c
5239
sd->cl = cl;
sys/dev/cxgbe/t4_sge.c
5240
sd->zidx = zidx;
sys/dev/cxgbe/t4_sge.c
5244
sd->moff = rxb->size2;
sys/dev/cxgbe/t4_sge.c
5247
sd->moff = 0;
sys/dev/cxgbe/t4_sge.c
5250
sd->nmbuf = 0;
sys/dev/cxgbe/t4_sge.c
5252
sd++;
sys/dev/cxgbe/t4_sge.c
5259
sd = fl->sdesc;
sys/dev/cxgbe/t4_sge.c
5308
struct fl_sdesc *sd;
sys/dev/cxgbe/t4_sge.c
5312
sd = fl->sdesc;
sys/dev/cxgbe/t4_sge.c
5313
for (i = 0; i < fl->sidx * 8; i++, sd++) {
sys/dev/cxgbe/t4_sge.c
5314
if (sd->cl == NULL)
sys/dev/cxgbe/t4_sge.c
5317
if (sd->nmbuf == 0)
sys/dev/cxgbe/t4_sge.c
5318
uma_zfree(sc->sge.rx_buf_info[sd->zidx].zone, sd->cl);
sys/dev/cxgbe/t4_sge.c
5320
clm = cl_metadata(sd);
sys/dev/cxgbe/t4_sge.c
5322
uma_zfree(sc->sge.rx_buf_info[sd->zidx].zone,
sys/dev/cxgbe/t4_sge.c
5323
sd->cl);
sys/dev/cxgbe/t4_sge.c
5327
sd->cl = NULL;
sys/dev/dpaa2/dpaa2_swp.c
329
uint8_t dcm, uint8_t epm, int sd, int sp, int se, int dp, int de, int ep)
sys/dev/dpaa2/dpaa2_swp.c
338
sd << DPAA2_SWP_CFG_SD_SHIFT |
sys/dev/dpaa2/dpaa2_swp.h
448
uint8_t rpm, uint8_t dcm, uint8_t epm, int sd, int sp, int se, int dp,
sys/dev/irdma/irdma_ctrl.c
2853
u32 *sd)
sys/dev/irdma/irdma_ctrl.c
2919
*sd = (u32)((size >> 21) + 1); /* add 1 for remainder */
sys/dev/irdma/irdma_ctrl.c
2921
*sd = (u32)(size >> 21);
sys/dev/irdma/irdma_ctrl.c
4686
u64 sd;
sys/dev/irdma/irdma_ctrl.c
4698
sd = (size >> 21) + 1; /* add 1 for remainder */
sys/dev/irdma/irdma_ctrl.c
4700
sd = size >> 21;
sys/dev/irdma/irdma_ctrl.c
4701
if (sd > 0xFFFFFFFF) {
sys/dev/irdma/irdma_ctrl.c
4702
irdma_debug(dev, IRDMA_DEBUG_HMC, "sd overflow[%ld]\n", sd);
sys/dev/irdma/irdma_ctrl.c
4703
sd = 0xFFFFFFFE;
sys/dev/irdma/irdma_ctrl.c
4706
return (u32)sd;
sys/dev/msk/if_msk.c
3556
struct msk_stat_desc *sd;
sys/dev/msk/if_msk.c
3571
sd = &sc->msk_stat_ring[cons];
sys/dev/msk/if_msk.c
3572
control = le32toh(sd->msk_control);
sys/dev/msk/if_msk.c
3576
sd->msk_control = htole32(control);
sys/dev/msk/if_msk.c
3577
status = le32toh(sd->msk_status);
sys/dev/pci/pcivar.h
305
#define PCI_SUBDEV(sv, sd) \
sys/dev/pci/pcivar.h
307
.match_flag_subdevice = 1, .subdevice = (sd)
sys/dev/qat/qat_api/common/compression/dc_session.c
251
hw_comp_lower_csr.sd =
sys/dev/qat/qat_api/common/compression/dc_session.c
259
hw_comp_lower_csr.sd =
sys/dev/qat/qat_api/common/compression/dc_session.c
263
hw_comp_lower_csr.sd =
sys/dev/qat/qat_api/common/compression/dc_session.c
267
hw_comp_lower_csr.sd = pService->comp_device_data
sys/dev/qat/qat_api/firmware/include/icp_qat_hw_20_comp.h
35
icp_qat_hw_comp_20_search_depth_t sd;
sys/dev/qat/qat_api/firmware/include/icp_qat_hw_20_comp.h
68
csr.sd,
sys/dev/sound/pci/envy24.c
2125
u_int16_t sv, sd;
sys/dev/sound/pci/envy24.c
2134
sd = pci_get_subdevice(dev);
sys/dev/sound/pci/envy24.c
2137
cfg_table[i].subdevice == sd) {
sys/dev/sound/pci/envy24.c
2380
u_int32_t sv, sd;
sys/dev/sound/pci/envy24.c
2402
sd = pci_get_subdevice(sc->dev);
sys/dev/sound/pci/envy24.c
2403
if (sv == cfg_table[i].subvendor && sd == cfg_table[i].subdevice) {
sys/dev/sound/pci/envy24ht.c
2039
u_int16_t sv, sd;
sys/dev/sound/pci/envy24ht.c
2048
sd = pci_get_subdevice(dev);
sys/dev/sound/pci/envy24ht.c
2051
cfg_table[i].subdevice == sd) {
sys/dev/sound/pci/envy24ht.c
2285
u_int32_t sv, sd;
sys/dev/sound/pci/envy24ht.c
2309
sd = pci_get_subdevice(sc->dev);
sys/dev/sound/pci/envy24ht.c
2310
if (sv == cfg_table[i].subvendor && sd == cfg_table[i].subdevice) {
sys/dev/thunderbolt/tb_pcib.c
112
uint16_t v, d, sv, sd;
sys/dev/thunderbolt/tb_pcib.c
117
sd = pci_get_subdevice(dev);
sys/dev/thunderbolt/tb_pcib.c
127
((n->subdevice != 0xffff) && (n->subdevice != sd)))
sys/dev/usb/storage/ustorage_fs.c
1023
uint32_t sd;
sys/dev/usb/storage/ustorage_fs.c
1051
sd = SS_LOGICAL_UNIT_NOT_SUPPORTED;
sys/dev/usb/storage/ustorage_fs.c
1055
sd = currlun->sense_data;
sys/dev/usb/storage/ustorage_fs.c
1066
buf[2] = SK(sd);
sys/dev/usb/storage/ustorage_fs.c
1071
buf[12] = ASC(sd);
sys/dev/usb/storage/ustorage_fs.c
1072
buf[13] = ASCQ(sd);
sys/dev/usb/template/usb_template.c
150
usb_decode_str_desc(struct usb_string_descriptor *sd, char *buf, size_t buflen)
sys/dev/usb/template/usb_template.c
154
if (sd->bLength < 2) {
sys/dev/usb/template/usb_template.c
159
for (i = 0; i < buflen - 1 && i < (sd->bLength / 2) - 1; i++)
sys/dev/usb/template/usb_template.c
160
buf[i] = UGETW(sd->bString[i]);
sys/dev/usb/template/usb_template.c
175
struct usb_string_descriptor *sd = arg1;
sys/dev/usb/template/usb_template.c
179
usb_decode_str_desc(sd, buf, sizeof(buf));
sys/dev/usb/template/usb_template.c
185
len = usb_make_str_desc(sd, sdlen, buf);
sys/dev/usb/template/usb_template.h
120
void usb_decode_str_desc(struct usb_string_descriptor *sd,
sys/geom/raid/g_raid.c
1075
struct g_raid_subdisk *sd;
sys/geom/raid/g_raid.c
1081
sd = &vol->v_subdisks[i];
sys/geom/raid/g_raid.c
1082
if (sd->sd_state == G_RAID_SUBDISK_S_NONE)
sys/geom/raid/g_raid.c
1084
if (sd->sd_disk->d_candelete)
sys/geom/raid/g_raid.c
1348
g_raid_subdisk_iostart(struct g_raid_subdisk *sd, struct bio *bp)
sys/geom/raid/g_raid.c
1353
bp->bio_caller1 = sd;
sys/geom/raid/g_raid.c
1360
if (sd->sd_disk == NULL) {
sys/geom/raid/g_raid.c
1369
disk = sd->sd_disk;
sys/geom/raid/g_raid.c
1383
TAILQ_FOREACH(tdisk, &sd->sd_softc->sc_disks, d_next) {
sys/geom/raid/g_raid.c
1395
bp->bio_error = g_raid_subdisk_kerneldump(sd,
sys/geom/raid/g_raid.c
1402
bp->bio_offset += sd->sd_offset;
sys/geom/raid/g_raid.c
1409
g_raid_subdisk_kerneldump(struct g_raid_subdisk *sd, void *virtual,
sys/geom/raid/g_raid.c
1413
if (sd->sd_disk == NULL)
sys/geom/raid/g_raid.c
1415
if (sd->sd_disk->d_kd.di.dumper == NULL)
sys/geom/raid/g_raid.c
1417
return (dump_write(&sd->sd_disk->d_kd.di, virtual,
sys/geom/raid/g_raid.c
1418
sd->sd_disk->d_kd.di.mediaoffset + sd->sd_offset + offset, length));
sys/geom/raid/g_raid.c
1425
struct g_raid_subdisk *sd;
sys/geom/raid/g_raid.c
1427
sd = bp->bio_caller1;
sys/geom/raid/g_raid.c
1428
sc = sd->sd_softc;
sys/geom/raid/g_raid.c
1441
struct g_raid_subdisk *sd;
sys/geom/raid/g_raid.c
1447
sd = bp->bio_caller1;
sys/geom/raid/g_raid.c
1448
sc = sd->sd_softc;
sys/geom/raid/g_raid.c
1449
vol = sd->sd_volume;
sys/geom/raid/g_raid.c
1456
bp->bio_offset -= sd->sd_offset;
sys/geom/raid/g_raid.c
1458
G_RAID_TR_IODONE(vol->v_tr, sd, bp);
sys/geom/raid/g_raid.c
1616
struct g_raid_subdisk *sd;
sys/geom/raid/g_raid.c
1640
sd = &vol->v_subdisks[i];
sys/geom/raid/g_raid.c
1641
if (sd->sd_state == G_RAID_SUBDISK_S_NONE)
sys/geom/raid/g_raid.c
1643
if ((sd->sd_disk->d_consumer->provider->flags &
sys/geom/raid/g_raid.c
1757
g_raid_update_subdisk(struct g_raid_subdisk *sd, u_int event)
sys/geom/raid/g_raid.c
1762
sc = sd->sd_softc;
sys/geom/raid/g_raid.c
1763
vol = sd->sd_volume;
sys/geom/raid/g_raid.c
1768
vol->v_name, sd->sd_pos,
sys/geom/raid/g_raid.c
1769
sd->sd_disk ? g_raid_get_diskname(sd->sd_disk) : "[none]");
sys/geom/raid/g_raid.c
1771
G_RAID_TR_EVENT(vol->v_tr, sd, event);
sys/geom/raid/g_raid.c
2125
struct g_raid_subdisk *sd, *tmp;
sys/geom/raid/g_raid.c
2133
TAILQ_FOREACH_SAFE(sd, &disk->d_subdisks, sd_next, tmp) {
sys/geom/raid/g_raid.c
2134
g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_NONE);
sys/geom/raid/g_raid.c
2135
g_raid_event_send(sd, G_RAID_SUBDISK_E_DISCONNECTED,
sys/geom/raid/g_raid.c
2137
TAILQ_REMOVE(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/g_raid.c
2138
sd->sd_disk = NULL;
sys/geom/raid/g_raid.c
2299
struct g_raid_subdisk *sd, struct g_raid_disk *disk)
sys/geom/raid/g_raid.c
2305
G_RAID_MD_WRITE(sc->sc_md, vol, sd, disk);
sys/geom/raid/g_raid.c
2309
struct g_raid_subdisk *sd, struct g_raid_disk *disk)
sys/geom/raid/g_raid.c
2313
disk = sd->sd_disk;
sys/geom/raid/g_raid.c
2324
G_RAID_MD_FAIL_DISK(sc->sc_md, sd, disk);
sys/geom/raid/g_raid.c
2333
struct g_raid_subdisk *sd;
sys/geom/raid/g_raid.c
2368
sd = &vol->v_subdisks[i];
sys/geom/raid/g_raid.c
2369
if (sd->sd_disk != NULL &&
sys/geom/raid/g_raid.c
2370
sd->sd_disk->d_consumer != NULL) {
sys/geom/raid/g_raid.c
2372
g_raid_get_diskname(sd->sd_disk));
sys/geom/raid/g_raid.c
2377
g_raid_subdisk_state2str(sd->sd_state));
sys/geom/raid/g_raid.c
2378
if (sd->sd_state == G_RAID_SUBDISK_S_REBUILD ||
sys/geom/raid/g_raid.c
2379
sd->sd_state == G_RAID_SUBDISK_S_RESYNC) {
sys/geom/raid/g_raid.c
2381
(int)(sd->sd_rebuild_pos * 100 /
sys/geom/raid/g_raid.c
2382
sd->sd_size));
sys/geom/raid/g_raid.c
2401
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/g_raid.c
2403
g_raid_subdisk_state2str(sd->sd_state));
sys/geom/raid/g_raid.c
2404
if (sd->sd_state == G_RAID_SUBDISK_S_REBUILD ||
sys/geom/raid/g_raid.c
2405
sd->sd_state == G_RAID_SUBDISK_S_RESYNC) {
sys/geom/raid/g_raid.c
2407
(int)(sd->sd_rebuild_pos * 100 /
sys/geom/raid/g_raid.c
2408
sd->sd_size));
sys/geom/raid/g_raid.c
2410
if (TAILQ_NEXT(sd, sd_next))
sys/geom/raid/g_raid.c
2417
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/g_raid.c
2419
sd->sd_volume->v_global_id,
sys/geom/raid/g_raid.c
2420
sd->sd_volume->v_name,
sys/geom/raid/g_raid.c
2421
sd->sd_pos, (uintmax_t)sd->sd_offset);
sys/geom/raid/g_raid.c
2422
if (TAILQ_NEXT(sd, sd_next))
sys/geom/raid/g_raid.c
528
struct g_raid_subdisk *sd;
sys/geom/raid/g_raid.c
541
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/g_raid.c
542
if (sd->sd_state < state)
sys/geom/raid/g_raid.c
543
state = sd->sd_state;
sys/geom/raid/g_raid.c
575
g_raid_change_subdisk_state(struct g_raid_subdisk *sd, int state)
sys/geom/raid/g_raid.c
578
G_RAID_DEBUG1(0, sd->sd_softc,
sys/geom/raid/g_raid.c
580
sd->sd_volume->v_name, sd->sd_pos,
sys/geom/raid/g_raid.c
581
sd->sd_disk ? g_raid_get_diskname(sd->sd_disk) : "[none]",
sys/geom/raid/g_raid.c
582
g_raid_subdisk_state2str(sd->sd_state),
sys/geom/raid/g_raid.c
584
sd->sd_state = state;
sys/geom/raid/g_raid.c
585
if (sd->sd_disk)
sys/geom/raid/g_raid.c
586
g_raid_report_disk_state(sd->sd_disk);
sys/geom/raid/g_raid.c
753
struct g_raid_subdisk *sd;
sys/geom/raid/g_raid.c
761
sd = &vol->v_subdisks[i];
sys/geom/raid/g_raid.c
763
sd->sd_state != G_RAID_SUBDISK_S_NONE) ||
sys/geom/raid/g_raid.c
764
sd->sd_state == state)
sys/geom/raid/g_raid.c
765
return (sd);
sys/geom/raid/g_raid.c
959
struct g_raid_subdisk *sd;
sys/geom/raid/g_raid.c
972
sd = &vol->v_subdisks[i];
sys/geom/raid/g_raid.c
973
if (sd->sd_state == G_RAID_SUBDISK_S_NONE ||
sys/geom/raid/g_raid.c
974
sd->sd_state == G_RAID_SUBDISK_S_FAILED)
sys/geom/raid/g_raid.c
979
cbp->bio_caller1 = sd;
sys/geom/raid/g_raid.c
983
sd = cbp->bio_caller1;
sys/geom/raid/g_raid.c
985
g_raid_subdisk_iostart(sd, cbp);
sys/geom/raid/g_raid.h
155
#define G_RAID_SUBDISK_POS(sd) \
sys/geom/raid/g_raid.h
156
((sd)->sd_disk ? ((sd)->sd_disk->d_last_offset - (sd)->sd_offset) : 0)
sys/geom/raid/g_raid.h
158
#define G_RAID_SUBDISK_LOAD(sd) \
sys/geom/raid/g_raid.h
159
((sd)->sd_disk ? ((sd)->sd_disk->d_load) : 0)
sys/geom/raid/g_raid.h
406
void g_raid_subdisk_iostart(struct g_raid_subdisk *sd, struct bio *bp);
sys/geom/raid/g_raid.h
407
int g_raid_subdisk_kerneldump(struct g_raid_subdisk *sd, void *virtual,
sys/geom/raid/g_raid.h
416
void g_raid_change_subdisk_state(struct g_raid_subdisk *sd, int state);
sys/geom/raid/g_raid.h
420
struct g_raid_subdisk *sd, struct g_raid_disk *disk);
sys/geom/raid/g_raid.h
422
struct g_raid_subdisk *sd, struct g_raid_disk *disk);
sys/geom/raid/md_ddf.c
1612
struct g_raid_subdisk *sd;
sys/geom/raid/md_ddf.c
1679
sd = &vol->v_subdisks[i];
sys/geom/raid/md_ddf.c
1680
if (sd->sd_state != G_RAID_SUBDISK_S_NONE)
sys/geom/raid/md_ddf.c
1681
size = sd->sd_size;
sys/geom/raid/md_ddf.c
1682
if (sd->sd_state <= G_RAID_SUBDISK_S_FAILED &&
sys/geom/raid/md_ddf.c
1684
vol->v_subdisks[i].sd_state < sd->sd_state))
sys/geom/raid/md_ddf.c
1729
sd = &vol->v_subdisks[disk_pos];
sys/geom/raid/md_ddf.c
1731
if (resurrection && sd->sd_disk != NULL) {
sys/geom/raid/md_ddf.c
1732
g_raid_change_disk_state(sd->sd_disk,
sys/geom/raid/md_ddf.c
1734
TAILQ_REMOVE(&sd->sd_disk->d_subdisks,
sys/geom/raid/md_ddf.c
1735
sd, sd_next);
sys/geom/raid/md_ddf.c
1738
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_ddf.c
1749
sd->sd_offset = eoff;
sys/geom/raid/md_ddf.c
1750
sd->sd_size = esize;
sys/geom/raid/md_ddf.c
1754
sd->sd_offset = (off_t)GET64P(pdmeta, val2 + md_disk_pos) * 512;
sys/geom/raid/md_ddf.c
1755
sd->sd_size = (off_t)GET64D(pdmeta, vdc1->Block_Count) * 512;
sys/geom/raid/md_ddf.c
1760
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_ddf.c
1764
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_ddf.c
1769
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_ddf.c
1771
sd->sd_rebuild_pos = 0;
sys/geom/raid/md_ddf.c
1776
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_ddf.c
1780
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_ddf.c
1783
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_ddf.c
1793
struct g_raid_subdisk *sd;
sys/geom/raid/md_ddf.c
1811
sd = &vol->v_subdisks[i];
sys/geom/raid/md_ddf.c
1812
if (sd->sd_state == G_RAID_SUBDISK_S_NONE ||
sys/geom/raid/md_ddf.c
1813
sd->sd_state == G_RAID_SUBDISK_S_FAILED)
sys/geom/raid/md_ddf.c
1828
sd = &vol->v_subdisks[i];
sys/geom/raid/md_ddf.c
1829
if (sd->sd_disk == disk)
sys/geom/raid/md_ddf.c
1857
struct g_raid_subdisk *sd;
sys/geom/raid/md_ddf.c
1898
sd = &vol->v_subdisks[i];
sys/geom/raid/md_ddf.c
1900
sd->sd_offset = 0;
sys/geom/raid/md_ddf.c
1901
sd->sd_size = GET64(vmeta, vdc->Block_Count) *
sys/geom/raid/md_ddf.c
1907
sd->sd_offset = GET64P(vmeta, val2 + j) * vol->v_sectorsize;
sys/geom/raid/md_ddf.c
1908
sd->sd_size = GET64(vmeta, bvdc[bvd]->Block_Count) *
sys/geom/raid/md_ddf.c
2249
struct g_raid_subdisk *sd;
sys/geom/raid/md_ddf.c
2486
sd = &vol->v_subdisks[i];
sys/geom/raid/md_ddf.c
2487
sd->sd_disk = disk;
sys/geom/raid/md_ddf.c
2488
sd->sd_offset = offs[i];
sys/geom/raid/md_ddf.c
2489
sd->sd_size = size;
sys/geom/raid/md_ddf.c
2492
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_ddf.c
2495
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_ddf.c
2497
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_ddf.c
2726
struct g_raid_subdisk *sd;
sys/geom/raid/md_ddf.c
2827
sd = &vol->v_subdisks[i];
sys/geom/raid/md_ddf.c
2830
disk = sd->sd_disk;
sys/geom/raid/md_ddf.c
2845
sd->sd_size / vol->v_sectorsize);
sys/geom/raid/md_ddf.c
2851
sd->sd_offset / vol->v_sectorsize);
sys/geom/raid/md_ddf.c
2863
if (sd->sd_state == G_RAID_SUBDISK_S_NONE)
sys/geom/raid/md_ddf.c
2867
else if (sd->sd_state == G_RAID_SUBDISK_S_FAILED)
sys/geom/raid/md_ddf.c
2871
else if (sd->sd_state <= G_RAID_SUBDISK_S_REBUILD)
sys/geom/raid/md_ddf.c
2966
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_ddf.c
2967
vol = sd->sd_volume;
sys/geom/raid/md_ddf.c
2977
bvd = sd->sd_pos / GET16(vmeta,
sys/geom/raid/md_ddf.c
2999
struct g_raid_subdisk *sd;
sys/geom/raid/md_ddf.c
3022
TAILQ_FOREACH(sd, &tdisk->d_subdisks, sd_next) {
sys/geom/raid/md_ddf.c
3023
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_ddf.c
3025
g_raid_event_send(sd, G_RAID_SUBDISK_E_FAILED,
sys/geom/raid/md_intel.c
1004
TAILQ_FOREACH_SAFE(sd, &olddisk->d_subdisks, sd_next, tmpsd) {
sys/geom/raid/md_intel.c
1005
TAILQ_REMOVE(&olddisk->d_subdisks, sd, sd_next);
sys/geom/raid/md_intel.c
1006
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_intel.c
1007
sd->sd_disk = disk;
sys/geom/raid/md_intel.c
1035
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_intel.c
1036
pv = sd->sd_volume->v_md_data;
sys/geom/raid/md_intel.c
1054
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1058
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1062
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1068
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1070
} else if (mmap0->disk_idx[sd->sd_pos] & INTEL_DI_RBLD) {
sys/geom/raid/md_intel.c
1072
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1077
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1081
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1086
if (mmap0->disk_idx[sd->sd_pos] & INTEL_DI_RBLD) {
sys/geom/raid/md_intel.c
1088
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1090
} else if (mmap1->disk_idx[sd->sd_pos] & INTEL_DI_RBLD) {
sys/geom/raid/md_intel.c
1092
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1095
sd->sd_rebuild_pos = 0;
sys/geom/raid/md_intel.c
1097
sd->sd_rebuild_pos =
sys/geom/raid/md_intel.c
1099
sd->sd_volume->v_strip_size *
sys/geom/raid/md_intel.c
1105
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1110
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1114
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1119
if (mmap0->disk_idx[sd->sd_pos] & INTEL_DI_RBLD) {
sys/geom/raid/md_intel.c
1121
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1123
} else if ((mmap1->disk_idx[sd->sd_pos] & INTEL_DI_RBLD) ||
sys/geom/raid/md_intel.c
1126
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1129
sd->sd_rebuild_pos = 0;
sys/geom/raid/md_intel.c
1131
sd->sd_rebuild_pos =
sys/geom/raid/md_intel.c
1133
sd->sd_volume->v_strip_size *
sys/geom/raid/md_intel.c
1138
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1142
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1148
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1152
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1156
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_intel.c
1257
struct g_raid_subdisk *sd;
sys/geom/raid/md_intel.c
1304
sd = &vol->v_subdisks[j];
sys/geom/raid/md_intel.c
1305
sd->sd_offset = intel_get_map_offset(mmap) * 512; //ZZZ
sys/geom/raid/md_intel.c
1306
sd->sd_size = intel_get_map_disk_sectors(mmap) * 512; //ZZZ
sys/geom/raid/md_intel.c
1329
sd = &vol->v_subdisks[j];
sys/geom/raid/md_intel.c
1330
sd->sd_disk = disk;
sys/geom/raid/md_intel.c
1331
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_intel.c
1633
struct g_raid_subdisk *sd;
sys/geom/raid/md_intel.c
1658
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_intel.c
1659
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1661
g_raid_event_send(sd, G_RAID_SUBDISK_E_DISCONNECTED,
sys/geom/raid/md_intel.c
1690
struct g_raid_subdisk *sd;
sys/geom/raid/md_intel.c
1887
sd = &vol->v_subdisks[pd->pd_disk_pos];
sys/geom/raid/md_intel.c
1888
sd->sd_disk = disk;
sys/geom/raid/md_intel.c
1889
sd->sd_offset = 0;
sys/geom/raid/md_intel.c
1890
sd->sd_size = size;
sys/geom/raid/md_intel.c
1891
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_intel.c
1892
if (sd->sd_disk->d_consumer != NULL) {
sys/geom/raid/md_intel.c
1896
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1899
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
1901
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_intel.c
1992
sd = &vol1->v_subdisks[0];
sys/geom/raid/md_intel.c
1993
if (sd->sd_offset >
sys/geom/raid/md_intel.c
1994
size - (sd->sd_offset + sd->sd_size)) {
sys/geom/raid/md_intel.c
1996
size = sd->sd_offset;
sys/geom/raid/md_intel.c
1998
off = sd->sd_offset + sd->sd_size;
sys/geom/raid/md_intel.c
1999
size = size - (sd->sd_offset + sd->sd_size);
sys/geom/raid/md_intel.c
2081
sd = &vol->v_subdisks[i];
sys/geom/raid/md_intel.c
2082
sd->sd_disk = disk;
sys/geom/raid/md_intel.c
2083
sd->sd_offset = off;
sys/geom/raid/md_intel.c
2084
sd->sd_size = size;
sys/geom/raid/md_intel.c
2085
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_intel.c
2088
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
2091
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
2093
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_intel.c
2237
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_intel.c
2238
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
2240
g_raid_event_send(sd, G_RAID_SUBDISK_E_DISCONNECTED,
sys/geom/raid/md_intel.c
2347
struct g_raid_subdisk *sd;
sys/geom/raid/md_intel.c
2428
sd = &vol->v_subdisks[sdi];
sys/geom/raid/md_intel.c
2429
if (sd->sd_disk != NULL)
sys/geom/raid/md_intel.c
2490
sd = &vol->v_subdisks[sdi];
sys/geom/raid/md_intel.c
2491
if (sd->sd_state == G_RAID_SUBDISK_S_REBUILD)
sys/geom/raid/md_intel.c
2493
else if (sd->sd_state == G_RAID_SUBDISK_S_RESYNC &&
sys/geom/raid/md_intel.c
2496
else if (sd->sd_state == G_RAID_SUBDISK_S_STALE)
sys/geom/raid/md_intel.c
2498
if ((sd->sd_state == G_RAID_SUBDISK_S_REBUILD ||
sys/geom/raid/md_intel.c
2499
sd->sd_state == G_RAID_SUBDISK_S_RESYNC) &&
sys/geom/raid/md_intel.c
2500
sd->sd_rebuild_pos < pos)
sys/geom/raid/md_intel.c
2501
pos = sd->sd_rebuild_pos;
sys/geom/raid/md_intel.c
2518
intel_set_map_offset(mmap0, sd->sd_offset / sectorsize);
sys/geom/raid/md_intel.c
2519
intel_set_map_disk_sectors(mmap0, sd->sd_size / sectorsize);
sys/geom/raid/md_intel.c
2545
sd->sd_size / vol->v_strip_size / mmap0->total_domains);
sys/geom/raid/md_intel.c
2561
sd = &vol->v_subdisks[sdi];
sys/geom/raid/md_intel.c
2563
sd->sd_disk->d_md_data;
sys/geom/raid/md_intel.c
2567
if (sd->sd_state == G_RAID_SUBDISK_S_REBUILD ||
sys/geom/raid/md_intel.c
2568
sd->sd_state == G_RAID_SUBDISK_S_RESYNC) {
sys/geom/raid/md_intel.c
2570
} else if (sd->sd_state != G_RAID_SUBDISK_S_ACTIVE &&
sys/geom/raid/md_intel.c
2571
sd->sd_state != G_RAID_SUBDISK_S_STALE &&
sys/geom/raid/md_intel.c
2572
sd->sd_state != G_RAID_SUBDISK_S_UNINITIALIZED) {
sys/geom/raid/md_intel.c
2577
if ((sd->sd_state == G_RAID_SUBDISK_S_NONE ||
sys/geom/raid/md_intel.c
2578
sd->sd_state == G_RAID_SUBDISK_S_FAILED ||
sys/geom/raid/md_intel.c
2579
sd->sd_state == G_RAID_SUBDISK_S_REBUILD) &&
sys/geom/raid/md_intel.c
2622
struct g_raid_subdisk *sd;
sys/geom/raid/md_intel.c
2644
TAILQ_FOREACH(sd, &tdisk->d_subdisks, sd_next) {
sys/geom/raid/md_intel.c
2645
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_intel.c
2647
g_raid_event_send(sd, G_RAID_SUBDISK_E_FAILED,
sys/geom/raid/md_intel.c
909
struct g_raid_subdisk *sd, *tmpsd;
sys/geom/raid/md_intel.c
949
TAILQ_FOREACH(sd, &tmpdisk->d_subdisks, sd_next) {
sys/geom/raid/md_intel.c
953
if (sd->sd_offset + sd->sd_size + 4096 >
sys/geom/raid/md_intel.c
960
sd->sd_offset + sd->sd_size + 4096);
sys/geom/raid/md_intel.c
964
if (sd != NULL)
sys/geom/raid/md_jmicron.c
1024
struct g_raid_subdisk *sd;
sys/geom/raid/md_jmicron.c
1208
sd = &vol->v_subdisks[pd->pd_disk_pos];
sys/geom/raid/md_jmicron.c
1209
sd->sd_disk = disk;
sys/geom/raid/md_jmicron.c
1210
sd->sd_offset = 0;
sys/geom/raid/md_jmicron.c
1211
sd->sd_size = size;
sys/geom/raid/md_jmicron.c
1212
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_jmicron.c
1213
if (sd->sd_disk->d_consumer != NULL) {
sys/geom/raid/md_jmicron.c
1216
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_jmicron.c
1218
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_jmicron.c
1298
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_jmicron.c
1299
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_jmicron.c
1301
g_raid_event_send(sd, G_RAID_SUBDISK_E_DISCONNECTED,
sys/geom/raid/md_jmicron.c
1390
struct g_raid_subdisk *sd;
sys/geom/raid/md_jmicron.c
1425
sd = &vol->v_subdisks[i];
sys/geom/raid/md_jmicron.c
1426
if (sd->sd_disk == NULL || sd->sd_disk->d_md_data == NULL)
sys/geom/raid/md_jmicron.c
1430
sd->sd_disk->d_md_data;
sys/geom/raid/md_jmicron.c
1433
if (sd->sd_state < G_RAID_SUBDISK_S_STALE)
sys/geom/raid/md_jmicron.c
1465
if ((sd = TAILQ_FIRST(&disk->d_subdisks)) != NULL) {
sys/geom/raid/md_jmicron.c
1467
(sd->sd_offset / 512) / 16;
sys/geom/raid/md_jmicron.c
1469
(sd->sd_size / 512) >> 16;
sys/geom/raid/md_jmicron.c
1471
(sd->sd_size / 512) & 0xffff;
sys/geom/raid/md_jmicron.c
1472
if (sd->sd_state < G_RAID_SUBDISK_S_STALE)
sys/geom/raid/md_jmicron.c
1474
else if (sd->sd_state < G_RAID_SUBDISK_S_ACTIVE)
sys/geom/raid/md_jmicron.c
1491
struct g_raid_subdisk *sd;
sys/geom/raid/md_jmicron.c
1505
TAILQ_FOREACH(sd, &tdisk->d_subdisks, sd_next) {
sys/geom/raid/md_jmicron.c
1506
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_jmicron.c
1508
g_raid_event_send(sd, G_RAID_SUBDISK_E_FAILED,
sys/geom/raid/md_jmicron.c
423
struct g_raid_subdisk *sd, *tmpsd;
sys/geom/raid/md_jmicron.c
457
TAILQ_FOREACH(sd, &tmpdisk->d_subdisks, sd_next) {
sys/geom/raid/md_jmicron.c
458
if (sd->sd_offset + sd->sd_size + 512 >
sys/geom/raid/md_jmicron.c
463
sd->sd_offset + sd->sd_size + 512);
sys/geom/raid/md_jmicron.c
467
if (sd != NULL)
sys/geom/raid/md_jmicron.c
507
TAILQ_FOREACH_SAFE(sd, &olddisk->d_subdisks, sd_next, tmpsd) {
sys/geom/raid/md_jmicron.c
508
TAILQ_REMOVE(&olddisk->d_subdisks, sd, sd_next);
sys/geom/raid/md_jmicron.c
509
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_jmicron.c
510
sd->sd_disk = disk;
sys/geom/raid/md_jmicron.c
527
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_jmicron.c
533
sd->sd_offset =
sys/geom/raid/md_jmicron.c
535
sd->sd_size =
sys/geom/raid/md_jmicron.c
542
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_jmicron.c
547
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_jmicron.c
551
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_jmicron.c
555
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_jmicron.c
558
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_jmicron.c
649
struct g_raid_subdisk *sd;
sys/geom/raid/md_jmicron.c
692
sd = &vol->v_subdisks[j];
sys/geom/raid/md_jmicron.c
693
sd->sd_offset = (off_t)meta->offset * 16 * 512; //ZZZ
sys/geom/raid/md_jmicron.c
694
sd->sd_size = size;
sys/geom/raid/md_jmicron.c
706
sd = &vol->v_subdisks[disk_pos];
sys/geom/raid/md_jmicron.c
707
sd->sd_disk = disk;
sys/geom/raid/md_jmicron.c
708
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_jmicron.c
967
struct g_raid_subdisk *sd;
sys/geom/raid/md_jmicron.c
992
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_jmicron.c
993
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_jmicron.c
995
g_raid_event_send(sd, G_RAID_SUBDISK_E_DISCONNECTED,
sys/geom/raid/md_nvidia.c
1028
struct g_raid_subdisk *sd;
sys/geom/raid/md_nvidia.c
1213
sd = &vol->v_subdisks[pd->pd_disk_pos];
sys/geom/raid/md_nvidia.c
1214
sd->sd_disk = disk;
sys/geom/raid/md_nvidia.c
1215
sd->sd_offset = 0;
sys/geom/raid/md_nvidia.c
1216
sd->sd_size = size;
sys/geom/raid/md_nvidia.c
1217
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_nvidia.c
1218
if (sd->sd_disk->d_consumer != NULL) {
sys/geom/raid/md_nvidia.c
1221
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_nvidia.c
1223
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_nvidia.c
1303
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_nvidia.c
1304
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_nvidia.c
1306
g_raid_event_send(sd, G_RAID_SUBDISK_E_DISCONNECTED,
sys/geom/raid/md_nvidia.c
1394
struct g_raid_subdisk *sd;
sys/geom/raid/md_nvidia.c
1458
sd = &vol->v_subdisks[i];
sys/geom/raid/md_nvidia.c
1459
if ((sd->sd_state == G_RAID_SUBDISK_S_STALE ||
sys/geom/raid/md_nvidia.c
1460
sd->sd_state == G_RAID_SUBDISK_S_RESYNC ||
sys/geom/raid/md_nvidia.c
1464
else if (sd->sd_state == G_RAID_SUBDISK_S_NEW ||
sys/geom/raid/md_nvidia.c
1465
sd->sd_state == G_RAID_SUBDISK_S_REBUILD)
sys/geom/raid/md_nvidia.c
1484
if ((sd = TAILQ_FIRST(&disk->d_subdisks)) != NULL) {
sys/geom/raid/md_nvidia.c
1487
nvidia_meta_translate_disk(meta, sd->sd_pos);
sys/geom/raid/md_nvidia.c
1488
if (sd->sd_state != G_RAID_SUBDISK_S_ACTIVE) {
sys/geom/raid/md_nvidia.c
1491
sd->sd_rebuild_pos / vol->v_sectorsize *
sys/geom/raid/md_nvidia.c
1510
struct g_raid_subdisk *sd;
sys/geom/raid/md_nvidia.c
1525
TAILQ_FOREACH(sd, &tdisk->d_subdisks, sd_next) {
sys/geom/raid/md_nvidia.c
1526
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_nvidia.c
1528
g_raid_event_send(sd, G_RAID_SUBDISK_E_FAILED,
sys/geom/raid/md_nvidia.c
430
struct g_raid_subdisk *sd, *tmpsd;
sys/geom/raid/md_nvidia.c
468
TAILQ_FOREACH(sd, &tmpdisk->d_subdisks, sd_next) {
sys/geom/raid/md_nvidia.c
469
if (sd->sd_offset + sd->sd_size + 2 * 512 >
sys/geom/raid/md_nvidia.c
474
sd->sd_offset + sd->sd_size + 512);
sys/geom/raid/md_nvidia.c
478
if (sd != NULL)
sys/geom/raid/md_nvidia.c
511
TAILQ_FOREACH_SAFE(sd, &olddisk->d_subdisks, sd_next, tmpsd) {
sys/geom/raid/md_nvidia.c
512
TAILQ_REMOVE(&olddisk->d_subdisks, sd, sd_next);
sys/geom/raid/md_nvidia.c
513
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_nvidia.c
514
sd->sd_disk = disk;
sys/geom/raid/md_nvidia.c
535
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_nvidia.c
541
sd->sd_size = pd->pd_disk_size - 0x800 * 512;
sys/geom/raid/md_nvidia.c
545
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_nvidia.c
550
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_nvidia.c
552
sd->sd_rebuild_pos = (off_t)pd->pd_meta->rebuild_lba /
sys/geom/raid/md_nvidia.c
556
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_nvidia.c
558
sd->sd_rebuild_pos = (off_t)pd->pd_meta->rebuild_lba /
sys/geom/raid/md_nvidia.c
562
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_nvidia.c
565
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_nvidia.c
656
struct g_raid_subdisk *sd;
sys/geom/raid/md_nvidia.c
702
sd = &vol->v_subdisks[j];
sys/geom/raid/md_nvidia.c
703
sd->sd_offset = 0;
sys/geom/raid/md_nvidia.c
704
sd->sd_size = size;
sys/geom/raid/md_nvidia.c
715
sd = &vol->v_subdisks[disk_pos];
sys/geom/raid/md_nvidia.c
716
sd->sd_disk = disk;
sys/geom/raid/md_nvidia.c
717
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_nvidia.c
962
struct g_raid_subdisk *sd;
sys/geom/raid/md_nvidia.c
990
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_nvidia.c
991
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_nvidia.c
993
g_raid_event_send(sd, G_RAID_SUBDISK_E_DISCONNECTED,
sys/geom/raid/md_promise.c
1262
struct g_raid_subdisk *sd;
sys/geom/raid/md_promise.c
1475
sd = &vol->v_subdisks[i];
sys/geom/raid/md_promise.c
1476
sd->sd_disk = disk;
sys/geom/raid/md_promise.c
1477
sd->sd_offset = (off_t)offs[i] * 512;
sys/geom/raid/md_promise.c
1478
sd->sd_size = size;
sys/geom/raid/md_promise.c
1481
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_promise.c
1484
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_promise.c
1486
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_promise.c
1698
struct g_raid_subdisk *sd;
sys/geom/raid/md_promise.c
1780
sd = &vol->v_subdisks[i];
sys/geom/raid/md_promise.c
1785
if (sd->sd_state == G_RAID_SUBDISK_S_NONE) {
sys/geom/raid/md_promise.c
1787
} else if (sd->sd_state == G_RAID_SUBDISK_S_FAILED) {
sys/geom/raid/md_promise.c
1790
} else if (sd->sd_state <= G_RAID_SUBDISK_S_REBUILD) {
sys/geom/raid/md_promise.c
1793
if (sd->sd_state == G_RAID_SUBDISK_S_REBUILD) {
sys/geom/raid/md_promise.c
1795
sd->sd_rebuild_pos / 512);
sys/geom/raid/md_promise.c
1801
if (sd->sd_state < G_RAID_SUBDISK_S_ACTIVE) {
sys/geom/raid/md_promise.c
1803
if (sd->sd_state == G_RAID_SUBDISK_S_RESYNC) {
sys/geom/raid/md_promise.c
1805
sd->sd_rebuild_pos / 512);
sys/geom/raid/md_promise.c
1847
sd = &vol->v_subdisks[i];
sys/geom/raid/md_promise.c
1848
disk = sd->sd_disk;
sys/geom/raid/md_promise.c
1866
(sd->sd_offset / 512) >> 32;
sys/geom/raid/md_promise.c
1867
pd->pd_meta[j]->disk_offset = sd->sd_offset / 512;
sys/geom/raid/md_promise.c
1869
(sd->sd_size / 512) >> 32;
sys/geom/raid/md_promise.c
1870
pd->pd_meta[j]->disk_sectors = sd->sd_size / 512;
sys/geom/raid/md_promise.c
1871
if (sd->sd_state == G_RAID_SUBDISK_S_REBUILD) {
sys/geom/raid/md_promise.c
1873
(sd->sd_rebuild_pos / 512) >> 32;
sys/geom/raid/md_promise.c
1875
sd->sd_rebuild_pos / 512;
sys/geom/raid/md_promise.c
1876
} else if (sd->sd_state < G_RAID_SUBDISK_S_REBUILD) {
sys/geom/raid/md_promise.c
1911
struct g_raid_subdisk *sd;
sys/geom/raid/md_promise.c
1944
TAILQ_FOREACH(sd, &tdisk->d_subdisks, sd_next) {
sys/geom/raid/md_promise.c
1945
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_promise.c
1947
g_raid_event_send(sd, G_RAID_SUBDISK_E_FAILED,
sys/geom/raid/md_promise.c
668
struct g_raid_subdisk *sd;
sys/geom/raid/md_promise.c
725
sd = &vol->v_subdisks[i];
sys/geom/raid/md_promise.c
726
if (sd->sd_state != G_RAID_SUBDISK_S_NONE)
sys/geom/raid/md_promise.c
727
size = sd->sd_size;
sys/geom/raid/md_promise.c
728
if (sd->sd_state <= G_RAID_SUBDISK_S_FAILED &&
sys/geom/raid/md_promise.c
730
vol->v_subdisks[i].sd_state < sd->sd_state))
sys/geom/raid/md_promise.c
760
sd = &vol->v_subdisks[disk_pos];
sys/geom/raid/md_promise.c
762
if (resurrection && sd->sd_disk != NULL) {
sys/geom/raid/md_promise.c
763
g_raid_change_disk_state(sd->sd_disk,
sys/geom/raid/md_promise.c
765
TAILQ_REMOVE(&sd->sd_disk->d_subdisks,
sys/geom/raid/md_promise.c
766
sd, sd_next);
sys/geom/raid/md_promise.c
769
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_promise.c
780
sd->sd_offset = (off_t)eoff * 512;
sys/geom/raid/md_promise.c
781
sd->sd_size = (off_t)esize * 512;
sys/geom/raid/md_promise.c
783
sd->sd_offset = (((off_t)pd->pd_meta[sdn]->disk_offset_high
sys/geom/raid/md_promise.c
785
sd->sd_size = (((off_t)pd->pd_meta[sdn]->disk_sectors_high
sys/geom/raid/md_promise.c
791
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_promise.c
795
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_promise.c
799
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_promise.c
802
sd->sd_rebuild_pos = 0;
sys/geom/raid/md_promise.c
804
sd->sd_rebuild_pos =
sys/geom/raid/md_promise.c
810
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_promise.c
815
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_promise.c
819
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_promise.c
822
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_promise.c
832
struct g_raid_subdisk *sd;
sys/geom/raid/md_promise.c
850
sd = &vol->v_subdisks[i];
sys/geom/raid/md_promise.c
851
if (sd->sd_state == G_RAID_SUBDISK_S_NONE ||
sys/geom/raid/md_promise.c
852
sd->sd_state == G_RAID_SUBDISK_S_FAILED)
sys/geom/raid/md_promise.c
867
sd = &vol->v_subdisks[i];
sys/geom/raid/md_promise.c
868
if (sd->sd_disk == disk)
sys/geom/raid/md_promise.c
896
struct g_raid_subdisk *sd;
sys/geom/raid/md_promise.c
936
sd = &vol->v_subdisks[i];
sys/geom/raid/md_promise.c
937
sd->sd_offset = (((off_t)meta->disk_offset_high << 32) +
sys/geom/raid/md_promise.c
939
sd->sd_size = (((off_t)meta->disk_sectors_high << 32) +
sys/geom/raid/md_sii.c
1062
struct g_raid_subdisk *sd;
sys/geom/raid/md_sii.c
1087
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_sii.c
1088
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_sii.c
1090
g_raid_event_send(sd, G_RAID_SUBDISK_E_DISCONNECTED,
sys/geom/raid/md_sii.c
1119
struct g_raid_subdisk *sd;
sys/geom/raid/md_sii.c
1302
sd = &vol->v_subdisks[pd->pd_disk_pos];
sys/geom/raid/md_sii.c
1303
sd->sd_disk = disk;
sys/geom/raid/md_sii.c
1304
sd->sd_offset = 0;
sys/geom/raid/md_sii.c
1305
sd->sd_size = size;
sys/geom/raid/md_sii.c
1306
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_sii.c
1307
if (sd->sd_disk->d_consumer != NULL) {
sys/geom/raid/md_sii.c
1310
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_sii.c
1312
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_sii.c
1392
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_sii.c
1393
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_sii.c
1395
g_raid_event_send(sd, G_RAID_SUBDISK_E_DISCONNECTED,
sys/geom/raid/md_sii.c
1485
struct g_raid_subdisk *sd;
sys/geom/raid/md_sii.c
1539
sd = &vol->v_subdisks[i];
sys/geom/raid/md_sii.c
1540
if (sd->sd_state == G_RAID_SUBDISK_S_STALE ||
sys/geom/raid/md_sii.c
1541
sd->sd_state == G_RAID_SUBDISK_S_RESYNC)
sys/geom/raid/md_sii.c
1560
if ((sd = TAILQ_FIRST(&disk->d_subdisks)) != NULL) {
sys/geom/raid/md_sii.c
1561
if (sd->sd_state < G_RAID_SUBDISK_S_NEW)
sys/geom/raid/md_sii.c
1563
else if (sd->sd_state < G_RAID_SUBDISK_S_STALE) {
sys/geom/raid/md_sii.c
1566
sd->sd_rebuild_pos / vol->v_sectorsize;
sys/geom/raid/md_sii.c
1570
pd->pd_meta->disk_number = sd->sd_pos;
sys/geom/raid/md_sii.c
1574
pd->pd_meta->disk_number = sd->sd_pos / meta->raid1_disks;
sys/geom/raid/md_sii.c
1575
pd->pd_meta->raid0_ident = sd->sd_pos % meta->raid1_disks;
sys/geom/raid/md_sii.c
1576
pd->pd_meta->raid1_ident = sd->sd_pos / meta->raid1_disks;
sys/geom/raid/md_sii.c
1578
pd->pd_meta->disk_number = sd->sd_pos;
sys/geom/raid/md_sii.c
1597
struct g_raid_subdisk *sd;
sys/geom/raid/md_sii.c
1620
TAILQ_FOREACH(sd, &tdisk->d_subdisks, sd_next) {
sys/geom/raid/md_sii.c
1621
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_sii.c
1623
g_raid_event_send(sd, G_RAID_SUBDISK_E_FAILED,
sys/geom/raid/md_sii.c
478
struct g_raid_subdisk *sd, *tmpsd;
sys/geom/raid/md_sii.c
512
TAILQ_FOREACH(sd, &tmpdisk->d_subdisks, sd_next) {
sys/geom/raid/md_sii.c
513
if (sd->sd_offset + sd->sd_size + 512 >
sys/geom/raid/md_sii.c
518
sd->sd_offset + sd->sd_size + 512);
sys/geom/raid/md_sii.c
522
if (sd != NULL)
sys/geom/raid/md_sii.c
562
TAILQ_FOREACH_SAFE(sd, &olddisk->d_subdisks, sd_next, tmpsd) {
sys/geom/raid/md_sii.c
563
TAILQ_REMOVE(&olddisk->d_subdisks, sd, sd_next);
sys/geom/raid/md_sii.c
564
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/md_sii.c
565
sd->sd_disk = disk;
sys/geom/raid/md_sii.c
586
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
sys/geom/raid/md_sii.c
592
sd->sd_size = pd->pd_disk_size - 0x800 * 512;
sys/geom/raid/md_sii.c
596
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_sii.c
600
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_sii.c
603
sd->sd_rebuild_pos = pd->pd_meta->rebuild_lba * 512;
sys/geom/raid/md_sii.c
605
sd->sd_rebuild_pos = 0;
sys/geom/raid/md_sii.c
610
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_sii.c
614
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_sii.c
618
g_raid_change_subdisk_state(sd,
sys/geom/raid/md_sii.c
621
g_raid_event_send(sd, G_RAID_SUBDISK_E_NEW,
sys/geom/raid/md_sii.c
712
struct g_raid_subdisk *sd;
sys/geom/raid/md_sii.c
758
sd = &vol->v_subdisks[j];
sys/geom/raid/md_sii.c
759
sd->sd_offset = 0;
sys/geom/raid/md_sii.c
760
sd->sd_size = size;
sys/geom/raid/md_sii.c
771
sd = &vol->v_subdisks[disk_pos];
sys/geom/raid/md_sii.c
772
sd->sd_disk = disk;
sys/geom/raid/md_sii.c
773
TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
sys/geom/raid/tr_concat.c
151
struct g_raid_subdisk *sd, u_int event)
sys/geom/raid/tr_concat.c
162
state = sd->sd_state;
sys/geom/raid/tr_concat.c
168
vol->v_name, sd->sd_pos,
sys/geom/raid/tr_concat.c
169
g_raid_subdisk_state2str(sd->sd_state));
sys/geom/raid/tr_concat.c
170
g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_ACTIVE);
sys/geom/raid/tr_concat.c
172
if (state != sd->sd_state &&
sys/geom/raid/tr_concat.c
174
g_raid_write_metadata(sc, vol, sd, NULL);
sys/geom/raid/tr_concat.c
210
struct g_raid_subdisk *sd;
sys/geom/raid/tr_concat.c
246
sd = &vol->v_subdisks[no];
sys/geom/raid/tr_concat.c
247
length = MIN(sd->sd_size - offset, remain);
sys/geom/raid/tr_concat.c
262
cbp->bio_caller1 = sd;
sys/geom/raid/tr_concat.c
272
sd = cbp->bio_caller1;
sys/geom/raid/tr_concat.c
274
g_raid_subdisk_iostart(sd, cbp);
sys/geom/raid/tr_concat.c
290
struct g_raid_subdisk *sd;
sys/geom/raid/tr_concat.c
311
sd = &vol->v_subdisks[no];
sys/geom/raid/tr_concat.c
312
length = MIN(sd->sd_size - offset, remain);
sys/geom/raid/tr_concat.c
329
struct g_raid_subdisk *sd,struct bio *bp)
sys/geom/raid/tr_raid0.c
132
struct g_raid_subdisk *sd, u_int event)
sys/geom/raid/tr_raid0.c
143
state = sd->sd_state;
sys/geom/raid/tr_raid0.c
149
vol->v_name, sd->sd_pos,
sys/geom/raid/tr_raid0.c
150
g_raid_subdisk_state2str(sd->sd_state));
sys/geom/raid/tr_raid0.c
151
g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_ACTIVE);
sys/geom/raid/tr_raid0.c
153
if (state != sd->sd_state &&
sys/geom/raid/tr_raid0.c
155
g_raid_write_metadata(sc, vol, sd, NULL);
sys/geom/raid/tr_raid0.c
191
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid0.c
254
sd = cbp->bio_caller1;
sys/geom/raid/tr_raid0.c
256
g_raid_subdisk_iostart(sd, cbp);
sys/geom/raid/tr_raid0.c
313
struct g_raid_subdisk *sd,struct bio *bp)
sys/geom/raid/tr_raid1.c
131
struct g_raid_subdisk *sd);
sys/geom/raid/tr_raid1.c
149
struct g_raid_subdisk *sd)
sys/geom/raid/tr_raid1.c
206
g_raid_tr_raid1_maybe_rebuild(vol->v_tr, sd);
sys/geom/raid/tr_raid1.c
220
g_raid_tr_raid1_fail_disk(struct g_raid_softc *sc, struct g_raid_subdisk *sd,
sys/geom/raid/tr_raid1.c
232
if (g_raid_nsubdisks(sd->sd_volume, G_RAID_SUBDISK_S_ACTIVE) == 1 &&
sys/geom/raid/tr_raid1.c
233
g_raid_get_subdisk(sd->sd_volume, G_RAID_SUBDISK_S_ACTIVE) == sd)
sys/geom/raid/tr_raid1.c
235
g_raid_fail_disk(sc, sd, disk);
sys/geom/raid/tr_raid1.c
242
struct g_raid_subdisk *sd, *good_sd;
sys/geom/raid/tr_raid1.c
248
sd = trs->trso_failed_sd;
sys/geom/raid/tr_raid1.c
249
good_sd = g_raid_get_subdisk(sd->sd_volume, G_RAID_SUBDISK_S_ACTIVE);
sys/geom/raid/tr_raid1.c
256
bp->bio_offset = sd->sd_rebuild_pos;
sys/geom/raid/tr_raid1.c
258
sd->sd_size - sd->sd_rebuild_pos);
sys/geom/raid/tr_raid1.c
265
g_raid_lock_range(sd->sd_volume, /* Lock callback starts I/O */
sys/geom/raid/tr_raid1.c
273
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1.c
276
sd = trs->trso_failed_sd;
sys/geom/raid/tr_raid1.c
277
g_raid_write_metadata(vol->v_softc, vol, sd, sd->sd_disk);
sys/geom/raid/tr_raid1.c
291
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1.c
294
sd = trs->trso_failed_sd;
sys/geom/raid/tr_raid1.c
297
sd->sd_volume->v_name, sd->sd_pos,
sys/geom/raid/tr_raid1.c
298
sd->sd_disk ? g_raid_get_diskname(sd->sd_disk) : "[none]");
sys/geom/raid/tr_raid1.c
299
g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_ACTIVE);
sys/geom/raid/tr_raid1.c
300
sd->sd_rebuild_pos = 0;
sys/geom/raid/tr_raid1.c
308
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1.c
314
sd = trs->trso_failed_sd;
sys/geom/raid/tr_raid1.c
318
sd->sd_volume->v_name, sd->sd_pos,
sys/geom/raid/tr_raid1.c
319
sd->sd_disk ? g_raid_get_diskname(sd->sd_disk) : "[none]");
sys/geom/raid/tr_raid1.c
324
sd->sd_volume->v_name, sd->sd_pos,
sys/geom/raid/tr_raid1.c
325
sd->sd_disk ? g_raid_get_diskname(sd->sd_disk) : "[none]");
sys/geom/raid/tr_raid1.c
330
sd->sd_size - sd->sd_rebuild_pos);
sys/geom/raid/tr_raid1.c
332
sd->sd_rebuild_pos, len);
sys/geom/raid/tr_raid1.c
343
struct g_raid_subdisk *sd, *fsd;
sys/geom/raid/tr_raid1.c
353
sd = g_raid_get_subdisk(vol, G_RAID_SUBDISK_S_ACTIVE);
sys/geom/raid/tr_raid1.c
354
if (sd == NULL) {
sys/geom/raid/tr_raid1.c
403
struct g_raid_subdisk *sd)
sys/geom/raid/tr_raid1.c
436
if (na == 0 || nr == 0 || trs->trso_failed_sd == sd)
sys/geom/raid/tr_raid1.c
446
struct g_raid_subdisk *sd, u_int event)
sys/geom/raid/tr_raid1.c
449
g_raid_tr_update_state_raid1(tr->tro_volume, sd);
sys/geom/raid/tr_raid1.c
489
struct g_raid_subdisk *sd, *best;
sys/geom/raid/tr_raid1.c
495
sd = &vol->v_subdisks[i];
sys/geom/raid/tr_raid1.c
496
if (sd->sd_state != G_RAID_SUBDISK_S_ACTIVE &&
sys/geom/raid/tr_raid1.c
497
((sd->sd_state != G_RAID_SUBDISK_S_REBUILD &&
sys/geom/raid/tr_raid1.c
498
sd->sd_state != G_RAID_SUBDISK_S_RESYNC) ||
sys/geom/raid/tr_raid1.c
499
bp->bio_offset + bp->bio_length > sd->sd_rebuild_pos))
sys/geom/raid/tr_raid1.c
503
prio = G_RAID_SUBDISK_LOAD(sd);
sys/geom/raid/tr_raid1.c
504
prio += min(sd->sd_recovery, 255) << 22;
sys/geom/raid/tr_raid1.c
505
prio += (G_RAID_SUBDISK_S_ACTIVE - sd->sd_state) << 16;
sys/geom/raid/tr_raid1.c
507
if (G_RAID_SUBDISK_POS(sd) == bp->bio_offset)
sys/geom/raid/tr_raid1.c
511
if (ABS(G_RAID_SUBDISK_POS(sd) - bp->bio_offset) <
sys/geom/raid/tr_raid1.c
515
best = sd;
sys/geom/raid/tr_raid1.c
525
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1.c
528
sd = g_raid_tr_raid1_select_read_disk(tr->tro_volume, bp, 0);
sys/geom/raid/tr_raid1.c
529
KASSERT(sd != NULL, ("No active disks in volume %s.",
sys/geom/raid/tr_raid1.c
538
g_raid_subdisk_iostart(sd, cbp);
sys/geom/raid/tr_raid1.c
545
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1.c
558
sd = &vol->v_subdisks[i];
sys/geom/raid/tr_raid1.c
559
switch (sd->sd_state) {
sys/geom/raid/tr_raid1.c
568
if (bp->bio_offset >= sd->sd_rebuild_pos)
sys/geom/raid/tr_raid1.c
586
cbp->bio_caller1 = sd;
sys/geom/raid/tr_raid1.c
590
sd = cbp->bio_caller1;
sys/geom/raid/tr_raid1.c
592
g_raid_subdisk_iostart(sd, cbp);
sys/geom/raid/tr_raid1.c
653
struct g_raid_subdisk *sd, struct bio *bp)
sys/geom/raid/tr_raid1.c
723
g_raid_tr_raid1_fail_disk(sd->sd_softc,
sys/geom/raid/tr_raid1.c
733
g_raid_unlock_range(sd->sd_volume,
sys/geom/raid/tr_raid1.c
777
sd->sd_disk->d_read_errs++;
sys/geom/raid/tr_raid1.c
780
bp->bio_error, sd->sd_disk->d_read_errs);
sys/geom/raid/tr_raid1.c
789
if (sd->sd_disk->d_read_errs > g_raid_read_err_thresh) {
sys/geom/raid/tr_raid1.c
790
g_raid_tr_raid1_fail_disk(sd->sd_softc, sd, sd->sd_disk);
sys/geom/raid/tr_raid1.c
801
pbp->bio_driver1 = do_write ? sd : NULL;
sys/geom/raid/tr_raid1.c
804
*mask |= 1 << sd->sd_pos;
sys/geom/raid/tr_raid1.c
811
sd->sd_recovery++;
sys/geom/raid/tr_raid1.c
815
g_raid_lock_range(sd->sd_volume,
sys/geom/raid/tr_raid1.c
870
g_raid_tr_raid1_fail_disk(sd->sd_softc, sd, sd->sd_disk);
sys/geom/raid/tr_raid1.c
878
g_raid_unlock_range(sd->sd_volume, bp->bio_offset,
sys/geom/raid/tr_raid1.c
886
g_raid_tr_raid1_fail_disk(sd->sd_softc, sd, sd->sd_disk);
sys/geom/raid/tr_raid1.c
903
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1.c
910
sd = &vol->v_subdisks[i];
sys/geom/raid/tr_raid1.c
911
switch (sd->sd_state) {
sys/geom/raid/tr_raid1.c
920
if (offset >= sd->sd_rebuild_pos)
sys/geom/raid/tr_raid1.c
935
error = g_raid_subdisk_kerneldump(sd, virtual, offset, length);
sys/geom/raid/tr_raid1.c
946
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1.c
949
sd = (struct g_raid_subdisk *)bp->bio_caller1;
sys/geom/raid/tr_raid1.c
950
g_raid_subdisk_iostart(sd, bp);
sys/geom/raid/tr_raid1e.c
1003
sd->sd_disk->d_read_errs++;
sys/geom/raid/tr_raid1e.c
1006
bp->bio_error, sd->sd_disk->d_read_errs);
sys/geom/raid/tr_raid1e.c
1015
if (sd->sd_disk->d_read_errs > g_raid_read_err_thresh)
sys/geom/raid/tr_raid1e.c
1016
g_raid_tr_raid1e_fail_disk(sd->sd_softc, sd, sd->sd_disk);
sys/geom/raid/tr_raid1e.c
1021
P2V(vol, sd->sd_pos, bp->bio_offset, &virtual, &copy);
sys/geom/raid/tr_raid1e.c
1047
sd->sd_recovery++;
sys/geom/raid/tr_raid1e.c
1052
g_raid_lock_range(sd->sd_volume,
sys/geom/raid/tr_raid1e.c
1073
P2V(vol, sd->sd_pos, bp->bio_offset, &virtual, &copy);
sys/geom/raid/tr_raid1e.c
1108
P2V(vol, sd->sd_pos, bp->bio_offset, &virtual, &copy);
sys/geom/raid/tr_raid1e.c
1120
g_raid_tr_raid1e_fail_disk(sd->sd_softc, sd, sd->sd_disk);
sys/geom/raid/tr_raid1e.c
1124
g_raid_unlock_range(sd->sd_volume, virtual, bp->bio_length);
sys/geom/raid/tr_raid1e.c
1131
g_raid_tr_raid1e_fail_disk(sd->sd_softc, sd, sd->sd_disk);
sys/geom/raid/tr_raid1e.c
1148
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1e.c
1164
sd = &vol->v_subdisks[no];
sys/geom/raid/tr_raid1e.c
1165
switch (sd->sd_state) {
sys/geom/raid/tr_raid1e.c
1171
if (offset + start >= sd->sd_rebuild_pos)
sys/geom/raid/tr_raid1e.c
1177
error = g_raid_subdisk_kerneldump(sd, addr,
sys/geom/raid/tr_raid1e.c
1198
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1e.c
1201
sd = (struct g_raid_subdisk *)bp->bio_caller1;
sys/geom/raid/tr_raid1e.c
1202
g_raid_subdisk_iostart(sd, bp);
sys/geom/raid/tr_raid1e.c
135
struct g_raid_subdisk *sd);
sys/geom/raid/tr_raid1e.c
192
struct g_raid_subdisk *sd, *bestsd, *worstsd;
sys/geom/raid/tr_raid1e.c
200
sd = &vol->v_subdisks[i * N + j];
sys/geom/raid/tr_raid1e.c
201
if (sd->sd_state > bestsd->sd_state)
sys/geom/raid/tr_raid1e.c
202
bestsd = sd;
sys/geom/raid/tr_raid1e.c
203
else if (sd->sd_state == bestsd->sd_state &&
sys/geom/raid/tr_raid1e.c
204
(sd->sd_state == G_RAID_SUBDISK_S_REBUILD ||
sys/geom/raid/tr_raid1e.c
205
sd->sd_state == G_RAID_SUBDISK_S_RESYNC) &&
sys/geom/raid/tr_raid1e.c
206
sd->sd_rebuild_pos > bestsd->sd_rebuild_pos)
sys/geom/raid/tr_raid1e.c
207
bestsd = sd;
sys/geom/raid/tr_raid1e.c
223
sd = &vol->v_subdisks[i * N + j];
sys/geom/raid/tr_raid1e.c
224
if (sd->sd_state < worstsd->sd_state)
sys/geom/raid/tr_raid1e.c
225
worstsd = sd;
sys/geom/raid/tr_raid1e.c
245
struct g_raid_subdisk *sd, *bestsd, *worstsd;
sys/geom/raid/tr_raid1e.c
253
sd = &vol->v_subdisks[i];
sys/geom/raid/tr_raid1e.c
254
if (sd->sd_state == G_RAID_SUBDISK_S_UNINITIALIZED) {
sys/geom/raid/tr_raid1e.c
258
vol->v_name, sd->sd_pos,
sys/geom/raid/tr_raid1e.c
259
g_raid_subdisk_state2str(sd->sd_state));
sys/geom/raid/tr_raid1e.c
260
g_raid_change_subdisk_state(sd,
sys/geom/raid/tr_raid1e.c
262
g_raid_write_metadata(sc, vol, sd, sd->sd_disk);
sys/geom/raid/tr_raid1e.c
270
sd = &vol->v_subdisks[(i + j) % vol->v_disks_count];
sys/geom/raid/tr_raid1e.c
271
if (sd->sd_state > bestsd->sd_state)
sys/geom/raid/tr_raid1e.c
272
bestsd = sd;
sys/geom/raid/tr_raid1e.c
273
else if (sd->sd_state == bestsd->sd_state &&
sys/geom/raid/tr_raid1e.c
274
(sd->sd_state == G_RAID_SUBDISK_S_REBUILD ||
sys/geom/raid/tr_raid1e.c
275
sd->sd_state == G_RAID_SUBDISK_S_RESYNC) &&
sys/geom/raid/tr_raid1e.c
276
sd->sd_rebuild_pos > bestsd->sd_rebuild_pos)
sys/geom/raid/tr_raid1e.c
277
bestsd = sd;
sys/geom/raid/tr_raid1e.c
278
if (sd->sd_state < worstsd->sd_state)
sys/geom/raid/tr_raid1e.c
279
worstsd = sd;
sys/geom/raid/tr_raid1e.c
297
struct g_raid_subdisk *sd)
sys/geom/raid/tr_raid1e.c
325
g_raid_tr_raid1e_maybe_rebuild(vol->v_tr, sd);
sys/geom/raid/tr_raid1e.c
330
g_raid_tr_raid1e_fail_disk(struct g_raid_softc *sc, struct g_raid_subdisk *sd,
sys/geom/raid/tr_raid1e.c
335
vol = sd->sd_volume;
sys/geom/raid/tr_raid1e.c
350
(sd->sd_state >= G_RAID_SUBDISK_S_UNINITIALIZED))
sys/geom/raid/tr_raid1e.c
352
g_raid_fail_disk(sc, sd, disk);
sys/geom/raid/tr_raid1e.c
359
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1e.c
362
sd = trs->trso_failed_sd;
sys/geom/raid/tr_raid1e.c
363
g_raid_write_metadata(vol->v_softc, vol, sd, sd->sd_disk);
sys/geom/raid/tr_raid1e.c
377
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1e.c
380
sd = trs->trso_failed_sd;
sys/geom/raid/tr_raid1e.c
383
sd->sd_volume->v_name, sd->sd_pos,
sys/geom/raid/tr_raid1e.c
384
sd->sd_disk ? g_raid_get_diskname(sd->sd_disk) : "[none]");
sys/geom/raid/tr_raid1e.c
385
g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_ACTIVE);
sys/geom/raid/tr_raid1e.c
386
sd->sd_rebuild_pos = 0;
sys/geom/raid/tr_raid1e.c
394
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1e.c
399
sd = trs->trso_failed_sd;
sys/geom/raid/tr_raid1e.c
403
sd->sd_volume->v_name, sd->sd_pos,
sys/geom/raid/tr_raid1e.c
404
sd->sd_disk ? g_raid_get_diskname(sd->sd_disk) : "[none]");
sys/geom/raid/tr_raid1e.c
409
sd->sd_volume->v_name, sd->sd_pos,
sys/geom/raid/tr_raid1e.c
410
sd->sd_disk ? g_raid_get_diskname(sd->sd_disk) : "[none]");
sys/geom/raid/tr_raid1e.c
427
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1e.c
437
sd = trs->trso_failed_sd;
sys/geom/raid/tr_raid1e.c
440
if (sd->sd_rebuild_pos >= sd->sd_size) {
sys/geom/raid/tr_raid1e.c
445
P2V(vol, sd->sd_pos, sd->sd_rebuild_pos, &virtual, &copy);
sys/geom/raid/tr_raid1e.c
450
sd->sd_size - sd->sd_rebuild_pos);
sys/geom/raid/tr_raid1e.c
466
sd->sd_rebuild_pos, sd->sd_rebuild_pos + len);
sys/geom/raid/tr_raid1e.c
467
sd->sd_rebuild_pos += len;
sys/geom/raid/tr_raid1e.c
485
P2V(vol, sd->sd_pos, sd->sd_rebuild_pos + len, &vend, &copy);
sys/geom/raid/tr_raid1e.c
493
g_raid_lock_range(sd->sd_volume, virtual, len, NULL, bp);
sys/geom/raid/tr_raid1e.c
501
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1e.c
511
sd = g_raid_get_subdisk(vol, G_RAID_SUBDISK_S_RESYNC);
sys/geom/raid/tr_raid1e.c
512
if (sd == NULL)
sys/geom/raid/tr_raid1e.c
513
sd = g_raid_get_subdisk(vol, G_RAID_SUBDISK_S_REBUILD);
sys/geom/raid/tr_raid1e.c
514
if (sd == NULL) {
sys/geom/raid/tr_raid1e.c
515
sd = g_raid_get_subdisk(vol, G_RAID_SUBDISK_S_STALE);
sys/geom/raid/tr_raid1e.c
516
if (sd != NULL) {
sys/geom/raid/tr_raid1e.c
517
sd->sd_rebuild_pos = 0;
sys/geom/raid/tr_raid1e.c
518
g_raid_change_subdisk_state(sd,
sys/geom/raid/tr_raid1e.c
520
g_raid_write_metadata(vol->v_softc, vol, sd, NULL);
sys/geom/raid/tr_raid1e.c
522
sd = g_raid_get_subdisk(vol,
sys/geom/raid/tr_raid1e.c
524
if (sd == NULL)
sys/geom/raid/tr_raid1e.c
525
sd = g_raid_get_subdisk(vol,
sys/geom/raid/tr_raid1e.c
527
if (sd != NULL) {
sys/geom/raid/tr_raid1e.c
528
sd->sd_rebuild_pos = 0;
sys/geom/raid/tr_raid1e.c
529
g_raid_change_subdisk_state(sd,
sys/geom/raid/tr_raid1e.c
532
vol, sd, NULL);
sys/geom/raid/tr_raid1e.c
536
if (sd == NULL) {
sys/geom/raid/tr_raid1e.c
541
trs->trso_failed_sd = sd;
sys/geom/raid/tr_raid1e.c
544
sd->sd_volume->v_name, sd->sd_pos,
sys/geom/raid/tr_raid1e.c
545
sd->sd_disk ? g_raid_get_diskname(sd->sd_disk) : "[none]",
sys/geom/raid/tr_raid1e.c
555
struct g_raid_subdisk *sd)
sys/geom/raid/tr_raid1e.c
582
trs->trso_failed_sd == sd)
sys/geom/raid/tr_raid1e.c
592
struct g_raid_subdisk *sd, u_int event)
sys/geom/raid/tr_raid1e.c
595
g_raid_tr_update_state_raid1e(tr->tro_volume, sd);
sys/geom/raid/tr_raid1e.c
635
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1e.c
642
sd = &vol->v_subdisks[(no + i) % vol->v_disks_count];
sys/geom/raid/tr_raid1e.c
647
prio = G_RAID_SUBDISK_LOAD(sd);
sys/geom/raid/tr_raid1e.c
648
if ((mask & (1 << sd->sd_pos)) != 0)
sys/geom/raid/tr_raid1e.c
650
switch (sd->sd_state) {
sys/geom/raid/tr_raid1e.c
654
if (offset + off < sd->sd_rebuild_pos)
sys/geom/raid/tr_raid1e.c
661
if (offset + off < sd->sd_rebuild_pos)
sys/geom/raid/tr_raid1e.c
667
prio += min(sd->sd_recovery, 255) << 16;
sys/geom/raid/tr_raid1e.c
669
if (G_RAID_SUBDISK_POS(sd) == offset)
sys/geom/raid/tr_raid1e.c
673
if (ABS(G_RAID_SUBDISK_POS(sd) - offset) <
sys/geom/raid/tr_raid1e.c
688
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1e.c
741
sd = cbp->bio_caller1;
sys/geom/raid/tr_raid1e.c
743
g_raid_subdisk_iostart(sd, cbp);
sys/geom/raid/tr_raid1e.c
758
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid1e.c
778
sd = &vol->v_subdisks[no];
sys/geom/raid/tr_raid1e.c
779
switch (sd->sd_state) {
sys/geom/raid/tr_raid1e.c
785
if (offset + start >= sd->sd_rebuild_pos)
sys/geom/raid/tr_raid1e.c
805
cbp->bio_caller1 = sd;
sys/geom/raid/tr_raid1e.c
819
sd = cbp->bio_caller1;
sys/geom/raid/tr_raid1e.c
821
g_raid_subdisk_iostart(sd, cbp);
sys/geom/raid/tr_raid1e.c
882
struct g_raid_subdisk *sd, struct bio *bp)
sys/geom/raid/tr_raid1e.c
939
g_raid_tr_raid1e_fail_disk(sd->sd_softc,
sys/geom/raid/tr_raid5.c
130
struct g_raid_subdisk *sd)
sys/geom/raid/tr_raid5.c
173
struct g_raid_subdisk *sd, u_int event)
sys/geom/raid/tr_raid5.c
176
g_raid_tr_update_state_raid5(tr->tro_volume, sd);
sys/geom/raid/tr_raid5.c
212
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid5.c
327
sd = cbp->bio_caller1;
sys/geom/raid/tr_raid5.c
329
g_raid_subdisk_iostart(sd, cbp);
sys/geom/raid/tr_raid5.c
369
struct g_raid_subdisk *sd, struct bio *bp)
sys/geom/raid/tr_raid5.c
396
struct g_raid_subdisk *sd;
sys/geom/raid/tr_raid5.c
399
sd = (struct g_raid_subdisk *)bp->bio_caller1;
sys/geom/raid/tr_raid5.c
400
g_raid_subdisk_iostart(sd, bp);
sys/i386/i386/bios.c
271
ssdtosd(&ssd, &p_gdt[GBIOSCODE32_SEL].sd);
sys/i386/i386/bios.c
277
ssdtosd(&ssd, &p_gdt[GBIOSCODE16_SEL].sd);
sys/i386/i386/bios.c
284
ssdtosd(&ssd, &p_gdt[GBIOSDATA_SEL].sd);
sys/i386/i386/bios.c
290
ssdtosd(&ssd, &p_gdt[GBIOSUTIL_SEL].sd);
sys/i386/i386/bios.c
296
ssdtosd(&ssd, &p_gdt[GBIOSARGS_SEL].sd);
sys/i386/i386/db_interface.c
103
sdp = (plp != NULL) ? &plp->ldt_sd : &ldt[0].sd;
sys/i386/i386/db_interface.c
105
sdp = &gdt[PCPU_GET(cpuid) * NGDT].sd;
sys/i386/i386/exec_machdep.c
928
desc.sd.sd_type = SDT_MEMERA;
sys/i386/i386/exec_machdep.c
929
desc.sd.sd_dpl = SEL_UPL;
sys/i386/i386/exec_machdep.c
930
desc.sd.sd_p = 1;
sys/i386/i386/exec_machdep.c
931
desc.sd.sd_def32 = 1;
sys/i386/i386/exec_machdep.c
932
desc.sd.sd_gran = 1;
sys/i386/i386/exec_machdep.c
933
desc.sd.sd_lolimit = 0xffff;
sys/i386/i386/exec_machdep.c
934
desc.sd.sd_hilimit = 0xf;
sys/i386/i386/exec_machdep.c
935
desc.sd.sd_lobase = lcall_addr;
sys/i386/i386/exec_machdep.c
936
desc.sd.sd_hibase = lcall_addr >> 24;
sys/i386/i386/machdep.c
1452
ssdtosd(&gdt_segs[x], &gdt0[x].sd);
sys/i386/i386/machdep.c
1499
PCPU_SET(fsgs_gdt, &gdt[GUFS_SEL].sd);
sys/i386/i386/machdep.c
1507
PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd);
sys/i386/i386/machdep.c
1586
gdt[GPROC0_SEL].sd.sd_type = SDT_SYS386TSS; /* clear busy bit */
sys/i386/i386/machdep.c
1626
gdt[GPROC0_SEL].sd.sd_lobase = (int)tss;
sys/i386/i386/machdep.c
1627
gdt[GPROC0_SEL].sd.sd_hibase = (u_int)tss >> 24;
sys/i386/i386/machdep.c
1628
gdt[GPROC0_SEL].sd.sd_type = SDT_SYS386TSS;
sys/i386/i386/machdep.c
1630
PCPU_SET(fsgs_gdt, &gdt[GUFS_SEL].sd);
sys/i386/i386/machdep.c
1631
PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd);
sys/i386/i386/machdep.c
1673
gdt[GPANIC_SEL].sd.sd_lobase = (int)dblfault_tss;
sys/i386/i386/machdep.c
1674
gdt[GPANIC_SEL].sd.sd_hibase = (u_int)dblfault_tss >> 24;
sys/i386/i386/machdep.c
1679
gdt[GLDT_SEL].sd.sd_lobase = (int)ldt;
sys/i386/i386/machdep.c
1680
gdt[GLDT_SEL].sd.sd_hibase = (u_int)ldt >> 24;
sys/i386/i386/machdep.c
1684
ssdtosd(&ldt_segs[x], &ldt[x].sd);
sys/i386/i386/machdep.c
737
sdtossd(struct segment_descriptor *sd, struct soft_segment_descriptor *ssd)
sys/i386/i386/machdep.c
739
ssd->ssd_base = (sd->sd_hibase << 24) | sd->sd_lobase;
sys/i386/i386/machdep.c
740
ssd->ssd_limit = (sd->sd_hilimit << 16) | sd->sd_lolimit;
sys/i386/i386/machdep.c
741
ssd->ssd_type = sd->sd_type;
sys/i386/i386/machdep.c
742
ssd->ssd_dpl = sd->sd_dpl;
sys/i386/i386/machdep.c
743
ssd->ssd_p = sd->sd_p;
sys/i386/i386/machdep.c
744
ssd->ssd_def32 = sd->sd_def32;
sys/i386/i386/machdep.c
745
ssd->ssd_gran = sd->sd_gran;
sys/i386/i386/mp_machdep.c
304
ssdtosd(&gdt_segs[x], &gdt[myid * NGDT + x].sd);
sys/i386/i386/mp_machdep.c
322
gdt[myid * NGDT + GPROC0_SEL].sd.sd_type = SDT_SYS386TSS;
sys/i386/i386/mp_machdep.c
326
PCPU_SET(tss_gdt, &gdt[myid * NGDT + GPROC0_SEL].sd);
sys/i386/i386/mp_machdep.c
330
PCPU_SET(fsgs_gdt, &gdt[myid * NGDT + GUFS_SEL].sd);
sys/i386/i386/ptrace_machdep.c
204
struct segment_descriptor *sdp, sd;
sys/i386/i386/ptrace_machdep.c
232
fill_based_sd(&sd, r);
sys/i386/i386/ptrace_machdep.c
234
td->td_pcb->pcb_fsd = sd;
sys/i386/i386/ptrace_machdep.c
237
td->td_pcb->pcb_gsd = sd;
sys/i386/i386/sys_machdep.c
104
struct segment_descriptor sd;
sys/i386/i386/sys_machdep.c
106
fill_based_sd(&sd, base);
sys/i386/i386/sys_machdep.c
108
td->td_pcb->pcb_fsd = sd;
sys/i386/i386/sys_machdep.c
110
PCPU_GET(fsgs_gdt)[0] = sd;
sys/i386/i386/sys_machdep.c
117
struct segment_descriptor sd;
sys/i386/i386/sys_machdep.c
119
fill_based_sd(&sd, base);
sys/i386/i386/sys_machdep.c
121
td->td_pcb->pcb_gsd = sd;
sys/i386/i386/sys_machdep.c
123
PCPU_GET(fsgs_gdt)[1] = sd;
sys/i386/i386/sys_machdep.c
414
gdt[gdt_idx].sd = pldt->ldt_sd;
sys/i386/i386/sys_machdep.c
607
switch (dp->sd.sd_type) {
sys/i386/i386/sys_machdep.c
609
dp->sd.sd_p = 0;
sys/i386/i386/sys_machdep.c
634
if (dp->sd.sd_p == 0)
sys/i386/i386/sys_machdep.c
655
if (dp->sd.sd_p != 0 && dp->sd.sd_dpl != SEL_UPL)
sys/i386/i386/sys_machdep.c
676
if (dp->sd.sd_type == SDT_SYSNULL)
sys/i386/i386/trap.c
894
sdtossd(&gdt[IDXSEL(frame->tf_cs & 0xffff)].sd, &softseg);
sys/i386/i386/vm_machdep.c
507
struct segment_descriptor sd;
sys/i386/i386/vm_machdep.c
517
sd.sd_lobase = base & 0xffffff;
sys/i386/i386/vm_machdep.c
518
sd.sd_hibase = (base >> 24) & 0xff;
sys/i386/i386/vm_machdep.c
519
sd.sd_lolimit = 0xffff; /* 4GB limit, wraps around */
sys/i386/i386/vm_machdep.c
520
sd.sd_hilimit = 0xf;
sys/i386/i386/vm_machdep.c
521
sd.sd_type = SDT_MEMRWA;
sys/i386/i386/vm_machdep.c
522
sd.sd_dpl = SEL_UPL;
sys/i386/i386/vm_machdep.c
523
sd.sd_p = 1;
sys/i386/i386/vm_machdep.c
524
sd.sd_xx = 0;
sys/i386/i386/vm_machdep.c
525
sd.sd_def32 = 1;
sys/i386/i386/vm_machdep.c
526
sd.sd_gran = 1;
sys/i386/i386/vm_machdep.c
529
td->td_pcb->pcb_gsd = sd;
sys/i386/i386/vm_machdep.c
531
PCPU_GET(fsgs_gdt)[1] = sd;
sys/i386/linux/linux_machdep.c
255
struct segment_descriptor sd;
sys/i386/linux/linux_machdep.c
287
memcpy(&sd, &a, sizeof(a));
sys/i386/linux/linux_machdep.c
289
td->td_pcb->pcb_gsd = sd;
sys/i386/linux/linux_machdep.c
392
desc.sd.sd_lolimit = (ld.limit & 0x0000ffff);
sys/i386/linux/linux_machdep.c
393
desc.sd.sd_hilimit = (ld.limit & 0x000f0000) >> 16;
sys/i386/linux/linux_machdep.c
394
desc.sd.sd_lobase = (ld.base_addr & 0x00ffffff);
sys/i386/linux/linux_machdep.c
395
desc.sd.sd_hibase = (ld.base_addr & 0xff000000) >> 24;
sys/i386/linux/linux_machdep.c
396
desc.sd.sd_type = SDT_MEMRO | ((ld.read_exec_only ^ 1) << 1) |
sys/i386/linux/linux_machdep.c
398
desc.sd.sd_dpl = 3;
sys/i386/linux/linux_machdep.c
399
desc.sd.sd_p = (ld.seg_not_present ^ 1);
sys/i386/linux/linux_machdep.c
400
desc.sd.sd_xx = 0;
sys/i386/linux/linux_machdep.c
401
desc.sd.sd_def32 = ld.seg_32bit;
sys/i386/linux/linux_machdep.c
402
desc.sd.sd_gran = ld.limit_in_pages;
sys/i386/linux/linux_machdep.c
486
struct segment_descriptor sd;
sys/i386/linux/linux_machdep.c
539
memcpy(&sd, &a, sizeof(a));
sys/i386/linux/linux_machdep.c
543
td->td_pcb->pcb_gsd = sd;
sys/i386/linux/linux_machdep.c
544
PCPU_GET(fsgs_gdt)[1] = sd;
sys/i386/linux/linux_machdep.c
559
struct segment_descriptor sd;
sys/i386/linux/linux_machdep.c
574
sd = PCPU_GET(fsgs_gdt)[1];
sys/i386/linux/linux_machdep.c
576
memcpy(&desc, &sd, sizeof(desc));
sys/kern/kern_syscalls.c
239
syscall_helper_register(struct syscall_helper_data *sd, int flags)
sys/kern/kern_syscalls.c
242
return (kern_syscall_helper_register(sysent, sd, flags));
sys/kern/kern_syscalls.c
247
struct syscall_helper_data *sd, int flags)
sys/kern/kern_syscalls.c
252
for (sd1 = sd; sd1->syscall_no != NO_SYSCALL; sd1++) {
sys/kern/kern_syscalls.c
256
kern_syscall_helper_unregister(sysents, sd);
sys/kern/kern_syscalls.c
265
syscall_helper_unregister(struct syscall_helper_data *sd)
sys/kern/kern_syscalls.c
268
return (kern_syscall_helper_unregister(sysent, sd));
sys/kern/kern_syscalls.c
273
struct syscall_helper_data *sd)
sys/kern/kern_syscalls.c
277
for (sd1 = sd; sd1->registered != 0; sd1++) {
sys/kern/systrace_args.c
2432
iarg[a++] = p->sd; /* int */
sys/kern/systrace_args.c
2440
iarg[a++] = p->sd; /* int */
sys/kern/systrace_args.c
2453
iarg[a++] = p->sd; /* int */
sys/kern/systrace_args.c
2466
iarg[a++] = p->sd; /* int */
sys/net/iflib.c
2696
rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, bool unload, if_rxsd_t sd,
sys/net/iflib.c
2709
sd->ifsd_fl = fl;
sys/net/iflib.c
2710
sd->ifsd_cl = &fl->ifl_sds.ifsd_cl[cidx];
sys/net/iflib.c
2725
payload = *sd->ifsd_cl;
sys/net/iflib.c
2773
assemble_segments(iflib_rxq_t rxq, if_rxd_info_t ri, if_rxsd_t sd, int *pf_rv)
sys/net/iflib.c
2786
m = rxd_frag_to_sd(rxq, &ri->iri_frags[i], !consumed, sd,
sys/net/iflib.c
2789
MPASS(*sd->ifsd_cl != NULL);
sys/net/iflib.c
2819
cl = *sd->ifsd_cl;
sys/net/iflib.c
2820
*sd->ifsd_cl = NULL;
sys/net/iflib.c
2824
m_cljset(m, cl, sd->ifsd_fl->ifl_cltype);
sys/net/iflib.c
2842
struct if_rxsd sd;
sys/net/iflib.c
2850
m = rxd_frag_to_sd(rxq, &ri->iri_frags[0], false, &sd,
sys/net/iflib.c
2860
memcpy(m->m_data, *sd.ifsd_cl, ri->iri_len);
sys/net/iflib.c
2866
m = assemble_segments(rxq, ri, &sd, &pf_rv);
sys/netinet/libalias/alias_skinny.c
303
struct skinny_header *sd;
sys/netinet/libalias/alias_skinny.c
313
sd = (struct skinny_header *)tcp_next(tc);
sys/netinet/libalias/alias_skinny.c
341
len = (sd->len);
sys/netinet/libalias/alias_skinny.c
342
msgId = (sd->msgId);
sys/netinet/libalias/alias_skinny.c
363
reg_mesg = (struct RegisterMessage *)&sd->msgId;
sys/netinet/libalias/alias_skinny.c
385
port_mesg = (struct IpPortMessage *)&sd->msgId;
sys/netinet/libalias/alias_skinny.c
403
opnrcvchn_ack = (struct OpenReceiveChannelAck *)&sd->msgId;
sys/netinet/libalias/alias_skinny.c
431
startmedia_tx = (struct StartMediaTransmission *)&sd->msgId;
sys/netinet/libalias/alias_skinny.c
440
sd = (struct skinny_header *)(((char *)&sd->msgId) + len);
sys/netinet/sctp_syscalls.c
155
AUDIT_ARG_FD(uap->sd);
sys/netinet/sctp_syscalls.c
156
error = getsock_cap(td, uap->sd,
sys/netinet/sctp_syscalls.c
259
AUDIT_ARG_FD(uap->sd);
sys/netinet/sctp_syscalls.c
260
error = getsock(td, uap->sd, &rights, &fp);
sys/netinet/sctp_syscalls.c
316
ktrgenio(uap->sd, UIO_WRITE, ktruio, error);
sys/netinet/sctp_syscalls.c
359
AUDIT_ARG_FD(uap->sd);
sys/netinet/sctp_syscalls.c
360
error = getsock(td, uap->sd, &rights, &fp);
sys/netinet/sctp_syscalls.c
431
ktrgenio(uap->sd, UIO_WRITE, ktruio, error);
sys/netinet/sctp_syscalls.c
461
AUDIT_ARG_FD(uap->sd);
sys/netinet/sctp_syscalls.c
462
error = getsock(td, uap->sd, cap_rights_init_one(&rights, CAP_RECV),
sys/netinet/sctp_syscalls.c
539
ktrgenio(uap->sd, UIO_READ, ktruio, error);
sys/netinet/sctp_uio.h
1318
sctp_sendmsgx(int sd, const void *, size_t, struct sockaddr *,
sys/netpfil/ipfilter/netinet/ip_nat.h
597
#define CALC_SUMD(s1, s2, sd) { \
sys/netpfil/ipfilter/netinet/ip_nat.h
605
(sd) = (s2) - (s1); \
sys/netpfil/ipfilter/netinet/ip_nat.h
606
(sd) = ((sd) & 0xffff) + ((sd) >> 16); }
sys/netpfil/ipfilter/netinet/ip_proxy.c
882
u_32_t s1, s2, sd;
sys/netpfil/ipfilter/netinet/ip_proxy.c
976
CALC_SUMD(s1, s2, sd);
sys/netpfil/ipfilter/netinet/ip_proxy.c
979
ipf_fix_outcksum(0, &ip->ip_sum, sd, 0);
sys/netpfil/ipfw/ip_fw_compat.c
174
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_compat.c
222
struct sockopt_data *sd, ipfw_obj_ctlv **prtlv,
sys/netpfil/ipfw/ip_fw_compat.c
233
op3 = (ip_fw3_opheader *)ipfw_get_sopt_space(sd, sd->valsize);
sys/netpfil/ipfw/ip_fw_compat.c
236
if (read + sizeof(*ctlv) > sd->valsize)
sys/netpfil/ipfw/ip_fw_compat.c
246
if (read + clen > sd->valsize || clen < sizeof(*ctlv) ||
sys/netpfil/ipfw/ip_fw_compat.c
280
if (read + sizeof(*ctlv) > sd->valsize)
sys/netpfil/ipfw/ip_fw_compat.c
287
if (read + clen > sd->valsize || clen < sizeof(*ctlv) ||
sys/netpfil/ipfw/ip_fw_compat.c
347
if (read != sd->valsize || rtlv == NULL) {
sys/netpfil/ipfw/ip_fw_compat.c
473
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_compat.c
482
ret = parse_rules_v0(chain, op3, sd, &rtlv, &nci);
sys/netpfil/ipfw/ip_fw_compat.c
526
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_compat.c
532
if (sd->valsize != sizeof(*rh))
sys/netpfil/ipfw/ip_fw_compat.c
535
rh = (ipfw_range_header_v0 *)ipfw_get_sopt_space(sd, sd->valsize);
sys/netpfil/ipfw/ip_fw_compat.c
550
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_compat.c
557
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_compat.c
564
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_compat.c
571
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_compat.c
578
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_dynamic.c
3086
ipfw_dump_states(struct ip_fw_chain *chain, struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_dynamic.c
3106
ctlv = (ipfw_obj_ctlv *)ipfw_get_sopt_space(sd, sizeof(*ctlv));
sys/netpfil/ipfw/ip_fw_dynamic.c
3115
dst = (ipfw_obj_dyntlv *)ipfw_get_sopt_space(sd, \
sys/netpfil/ipfw/ip_fw_iface.c
463
struct sockopt_data *sd;
sys/netpfil/ipfw/ip_fw_iface.c
476
i = (ipfw_iface_info *)ipfw_get_sopt_space(da->sd, sizeof(*i));
sys/netpfil/ipfw/ip_fw_iface.c
500
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_iface.c
507
olh = (struct _ipfw_obj_lheader *)ipfw_get_sopt_header(sd,sizeof(*olh));
sys/netpfil/ipfw/ip_fw_iface.c
510
if (sd->valsize < olh->size)
sys/netpfil/ipfw/ip_fw_iface.c
533
da.sd = sd;
sys/netpfil/ipfw/ip_fw_iface.c
71
struct sockopt_data *sd);
sys/netpfil/ipfw/ip_fw_nat.c
571
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_nat.c
580
if (sd->valsize < (sizeof(*oh) + sizeof(*ucfg)))
sys/netpfil/ipfw/ip_fw_nat.c
583
oh = (ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/ip_fw_nat.c
600
if (sd->valsize < read + ucfg->redir_cnt*sizeof(struct nat44_cfg_redir))
sys/netpfil/ipfw/ip_fw_nat.c
616
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_nat.c
623
if (sd->valsize < sizeof(*oh))
sys/netpfil/ipfw/ip_fw_nat.c
626
oh = (ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/ip_fw_nat.c
676
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_nat.c
689
if (sd->valsize < sz)
sys/netpfil/ipfw/ip_fw_nat.c
692
oh = (struct _ipfw_obj_header *)ipfw_get_sopt_header(sd, sz);
sys/netpfil/ipfw/ip_fw_nat.c
722
if (sd->valsize < sz) {
sys/netpfil/ipfw/ip_fw_nat.c
735
ser_r = (struct nat44_cfg_redir *)ipfw_get_sopt_space(sd,
sys/netpfil/ipfw/ip_fw_nat.c
751
sd, sizeof(*ser_s));
sys/netpfil/ipfw/ip_fw_nat.c
773
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_nat.c
781
if (sd->valsize < sizeof(ipfw_obj_lheader))
sys/netpfil/ipfw/ip_fw_nat.c
784
olh = (ipfw_obj_lheader *)ipfw_get_sopt_header(sd, sizeof(*olh));
sys/netpfil/ipfw/ip_fw_nat.c
794
if (sd->valsize < olh->size) {
sys/netpfil/ipfw/ip_fw_nat.c
800
ucfg = (struct nat44_cfg_nat *)ipfw_get_sopt_space(sd,
sys/netpfil/ipfw/ip_fw_nat.c
820
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_nat.c
830
if (sd->valsize < sz)
sys/netpfil/ipfw/ip_fw_nat.c
833
oh = (struct _ipfw_obj_header *)ipfw_get_sopt_header(sd, sz);
sys/netpfil/ipfw/ip_fw_nat.c
861
if (sd->valsize < sz + sizeof(*oh)) {
sys/netpfil/ipfw/ip_fw_nat.c
872
pbuf = (void *)ipfw_get_sopt_space(sd, LIBALIAS_BUF_SIZE);
sys/netpfil/ipfw/ip_fw_private.h
223
int ipfw_dump_states(struct ip_fw_chain *chain, struct sockopt_data *sd);
sys/netpfil/ipfw/ip_fw_sockopt.c
1039
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
1044
if (sd->valsize != sizeof(*rh))
sys/netpfil/ipfw/ip_fw_sockopt.c
1047
rh = (ipfw_range_header *)ipfw_get_sopt_space(sd, sd->valsize);
sys/netpfil/ipfw/ip_fw_sockopt.c
1070
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
1074
if (sd->valsize != sizeof(*rh))
sys/netpfil/ipfw/ip_fw_sockopt.c
1077
rh = (ipfw_range_header *)ipfw_get_sopt_space(sd, sd->valsize);
sys/netpfil/ipfw/ip_fw_sockopt.c
1097
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
1103
if (sd->valsize != sizeof(*rh))
sys/netpfil/ipfw/ip_fw_sockopt.c
1106
rh = (ipfw_range_header *)ipfw_get_sopt_space(sd, sd->valsize);
sys/netpfil/ipfw/ip_fw_sockopt.c
1199
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
1204
if (sd->valsize != sizeof(*rh))
sys/netpfil/ipfw/ip_fw_sockopt.c
1207
rh = (ipfw_range_header *)ipfw_get_sopt_space(sd, sd->valsize);
sys/netpfil/ipfw/ip_fw_sockopt.c
127
static int ipfw_flush_sopt_data(struct sockopt_data *sd);
sys/netpfil/ipfw/ip_fw_sockopt.c
158
struct sockopt_data *sd);
sys/netpfil/ipfw/ip_fw_sockopt.c
1728
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
1736
ntlv = (ipfw_obj_ntlv *)ipfw_get_sopt_space(sd, sizeof(*ntlv));
sys/netpfil/ipfw/ip_fw_sockopt.c
1746
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
1754
if ((error = export_objhash_ntlv(ni, i, sd)) != 0)
sys/netpfil/ipfw/ip_fw_sockopt.c
1763
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
1770
ctlv = (ipfw_obj_ctlv *)ipfw_get_sopt_space(sd, sizeof(*ctlv));
sys/netpfil/ipfw/ip_fw_sockopt.c
1780
error = export_named_objects(ipfw_get_table_objhash(ch), da, sd);
sys/netpfil/ipfw/ip_fw_sockopt.c
1785
return (export_named_objects(CHAIN_TO_SRV(ch), da, sd));
sys/netpfil/ipfw/ip_fw_sockopt.c
1795
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
1803
ctlv = (ipfw_obj_ctlv *)ipfw_get_sopt_space(sd, sizeof(*ctlv));
sys/netpfil/ipfw/ip_fw_sockopt.c
1816
dst = (caddr_t)ipfw_get_sopt_space(sd, l);
sys/netpfil/ipfw/ip_fw_sockopt.c
1892
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
1901
hdr = (ipfw_cfg_lheader *)ipfw_get_sopt_header(sd, sizeof(*hdr));
sys/netpfil/ipfw/ip_fw_sockopt.c
1971
if (sd->valsize < sz) {
sys/netpfil/ipfw/ip_fw_sockopt.c
1978
error = dump_named_objects(chain, &da, sd);
sys/netpfil/ipfw/ip_fw_sockopt.c
1984
error = dump_static_rules(chain, &da, sd);
sys/netpfil/ipfw/ip_fw_sockopt.c
1990
error = ipfw_dump_states(chain, sd);
sys/netpfil/ipfw/ip_fw_sockopt.c
2337
struct sockopt_data *sd, ipfw_obj_ctlv **prtlv,
sys/netpfil/ipfw/ip_fw_sockopt.c
2348
op3 = (ip_fw3_opheader *)ipfw_get_sopt_space(sd, sd->valsize);
sys/netpfil/ipfw/ip_fw_sockopt.c
2351
if (read + sizeof(*ctlv) > sd->valsize)
sys/netpfil/ipfw/ip_fw_sockopt.c
2361
if (read + clen > sd->valsize || clen < sizeof(*ctlv) ||
sys/netpfil/ipfw/ip_fw_sockopt.c
2395
if (read + sizeof(*ctlv) > sd->valsize)
sys/netpfil/ipfw/ip_fw_sockopt.c
2402
if (read + clen > sd->valsize || clen < sizeof(*ctlv) ||
sys/netpfil/ipfw/ip_fw_sockopt.c
2463
if (read != sd->valsize || rtlv == NULL) {
sys/netpfil/ipfw/ip_fw_sockopt.c
2503
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
2512
ret = parse_rules_v1(chain, op3, sd, &rtlv, &nci);
sys/netpfil/ipfw/ip_fw_sockopt.c
2542
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
2549
olh = (struct _ipfw_obj_lheader *)ipfw_get_sopt_header(sd,
sys/netpfil/ipfw/ip_fw_sockopt.c
2553
if (sd->valsize < olh->size)
sys/netpfil/ipfw/ip_fw_sockopt.c
2572
i = (ipfw_sopt_info *)ipfw_get_sopt_space(sd, sizeof(*i));
sys/netpfil/ipfw/ip_fw_sockopt.c
2783
struct sockopt_data *sd;
sys/netpfil/ipfw/ip_fw_sockopt.c
2786
sd = (struct sockopt_data *)arg;
sys/netpfil/ipfw/ip_fw_sockopt.c
2787
ntlv = (ipfw_obj_ntlv *)ipfw_get_sopt_space(sd, sizeof(*ntlv));
sys/netpfil/ipfw/ip_fw_sockopt.c
2803
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
2808
hdr = (ipfw_obj_lheader *)ipfw_get_sopt_header(sd, sizeof(*hdr));
sys/netpfil/ipfw/ip_fw_sockopt.c
2815
if (sd->valsize < hdr->size) {
sys/netpfil/ipfw/ip_fw_sockopt.c
2823
export_objhash_ntlv_internal, sd);
sys/netpfil/ipfw/ip_fw_sockopt.c
2849
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
2853
if (sd->valsize != sizeof(*hdr))
sys/netpfil/ipfw/ip_fw_sockopt.c
2856
hdr = (ipfw_cmd_header *)ipfw_get_sopt_space(sd, sd->valsize);
sys/netpfil/ipfw/ip_fw_sockopt.c
3069
ipfw_flush_sopt_data(struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_sockopt.c
3075
sz = sd->koff;
sys/netpfil/ipfw/ip_fw_sockopt.c
3079
sopt = sd->sopt;
sys/netpfil/ipfw/ip_fw_sockopt.c
3082
error = copyout(sd->kbuf, sopt->sopt_val, sz);
sys/netpfil/ipfw/ip_fw_sockopt.c
3087
memset(sd->kbuf, 0, sd->ksize);
sys/netpfil/ipfw/ip_fw_sockopt.c
3088
sd->ktotal += sz;
sys/netpfil/ipfw/ip_fw_sockopt.c
3089
sd->koff = 0;
sys/netpfil/ipfw/ip_fw_sockopt.c
3090
if (sd->ktotal + sd->ksize < sd->valsize)
sys/netpfil/ipfw/ip_fw_sockopt.c
3091
sd->kavail = sd->ksize;
sys/netpfil/ipfw/ip_fw_sockopt.c
3093
sd->kavail = sd->valsize - sd->ktotal;
sys/netpfil/ipfw/ip_fw_sockopt.c
3096
sopt->sopt_valsize = sd->ktotal;
sys/netpfil/ipfw/ip_fw_sockopt.c
3097
sopt->sopt_val = sd->sopt_val + sd->ktotal;
sys/netpfil/ipfw/ip_fw_sockopt.c
3109
ipfw_get_sopt_space(struct sockopt_data *sd, size_t needed)
sys/netpfil/ipfw/ip_fw_sockopt.c
3114
if (sd->kavail < needed) {
sys/netpfil/ipfw/ip_fw_sockopt.c
3118
error = ipfw_flush_sopt_data(sd);
sys/netpfil/ipfw/ip_fw_sockopt.c
3120
if (sd->kavail < needed || error != 0)
sys/netpfil/ipfw/ip_fw_sockopt.c
3124
addr = sd->kbuf + sd->koff;
sys/netpfil/ipfw/ip_fw_sockopt.c
3125
sd->koff += needed;
sys/netpfil/ipfw/ip_fw_sockopt.c
3126
sd->kavail -= needed;
sys/netpfil/ipfw/ip_fw_sockopt.c
3139
ipfw_get_sopt_header(struct sockopt_data *sd, size_t needed)
sys/netpfil/ipfw/ip_fw_sockopt.c
3143
if ((addr = ipfw_get_sopt_space(sd, needed)) == NULL)
sys/netpfil/ipfw/ip_fw_sockopt.c
3146
if (sd->kavail > 0)
sys/netpfil/ipfw/ip_fw_sockopt.c
3147
memset(sd->kbuf + sd->koff, 0, sd->kavail);
sys/netpfil/ipfw/ip_fw_table.c
1029
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
1035
if (sd->valsize != sizeof(*oh) + sizeof(ipfw_obj_ntlv))
sys/netpfil/ipfw/ip_fw_table.c
1373
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
1378
olh = (struct _ipfw_obj_lheader *)ipfw_get_sopt_header(sd,sizeof(*olh));
sys/netpfil/ipfw/ip_fw_table.c
1381
if (sd->valsize < olh->size)
sys/netpfil/ipfw/ip_fw_table.c
1385
error = export_tables(ch, olh, sd);
sys/netpfil/ipfw/ip_fw_table.c
1401
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
1409
oh = (struct _ipfw_obj_header *)ipfw_get_sopt_header(sd, sz);
sys/netpfil/ipfw/ip_fw_table.c
1436
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
1445
if (sd->valsize != sizeof(*oh) + sizeof(ipfw_xtable_info))
sys/netpfil/ipfw/ip_fw_table.c
1448
oh = (struct _ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/ip_fw_table.c
1493
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
1502
if (sd->valsize != sizeof(*oh) + sizeof(ipfw_xtable_info))
sys/netpfil/ipfw/ip_fw_table.c
1505
oh = (struct _ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/ip_fw_table.c
1652
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
1663
ntlv = (ipfw_obj_ntlv *)ipfw_get_sopt_space(sd, sizeof(*ntlv));
sys/netpfil/ipfw/ip_fw_table.c
1679
struct sockopt_data *sd;
sys/netpfil/ipfw/ip_fw_table.c
1771
struct sockopt_data *sd;
sys/netpfil/ipfw/ip_fw_table.c
1783
i = (ipfw_xtable_info *)ipfw_get_sopt_space(dta->sd, sizeof(*i));
sys/netpfil/ipfw/ip_fw_table.c
1800
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
1821
dta.sd = sd;
sys/netpfil/ipfw/ip_fw_table.c
1838
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
1849
oh = (struct _ipfw_obj_header *)ipfw_get_sopt_header(sd, sz);
sys/netpfil/ipfw/ip_fw_table.c
1863
if (sd->valsize < i->size) {
sys/netpfil/ipfw/ip_fw_table.c
1881
da.sd = sd;
sys/netpfil/ipfw/ip_fw_table.c
1909
tent = (ipfw_obj_tentry *)ipfw_get_sopt_space(da->sd, sizeof(*tent));
sys/netpfil/ipfw/ip_fw_table.c
2125
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
2133
olh = (struct _ipfw_obj_lheader *)ipfw_get_sopt_header(sd,sizeof(*olh));
sys/netpfil/ipfw/ip_fw_table.c
2136
if (sd->valsize < olh->size)
sys/netpfil/ipfw/ip_fw_table.c
2156
i = (ipfw_ta_info *)ipfw_get_sopt_space(sd, sizeof(*i));
sys/netpfil/ipfw/ip_fw_table.c
714
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
725
if (sd->valsize < (sizeof(*oh) + sizeof(*ctlv)))
sys/netpfil/ipfw/ip_fw_table.c
729
if (sd->valsize != sd->kavail)
sys/netpfil/ipfw/ip_fw_table.c
732
oh = (ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/ip_fw_table.c
741
if (ctlv->head.length + read != sd->valsize)
sys/netpfil/ipfw/ip_fw_table.c
746
if (ctlv->count * sizeof(*tent) + read != sd->valsize)
sys/netpfil/ipfw/ip_fw_table.c
757
ipfw_get_sopt_header(sd, sd->valsize);
sys/netpfil/ipfw/ip_fw_table.c
81
struct sockopt_data *sd);
sys/netpfil/ipfw/ip_fw_table.c
836
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
850
if (sd->valsize != sz)
sys/netpfil/ipfw/ip_fw_table.c
853
oh = (struct _ipfw_obj_header *)ipfw_get_sopt_header(sd, sz);
sys/netpfil/ipfw/ip_fw_table.c
902
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table.c
908
if (sd->valsize != sizeof(*oh))
sys/netpfil/ipfw/ip_fw_table.h
201
struct sockopt_data *sd);
sys/netpfil/ipfw/ip_fw_table_value.c
585
v = (ipfw_table_value *)ipfw_get_sopt_space(da->sd, sizeof(*v));
sys/netpfil/ipfw/ip_fw_table_value.c
608
struct sockopt_data *sd)
sys/netpfil/ipfw/ip_fw_table_value.c
615
olh = (struct _ipfw_obj_lheader *)ipfw_get_sopt_header(sd,sizeof(*olh));
sys/netpfil/ipfw/ip_fw_table_value.c
618
if (sd->valsize < olh->size)
sys/netpfil/ipfw/ip_fw_table_value.c
643
da.sd = sd;
sys/netpfil/ipfw/ip_fw_table_value.c
67
struct sockopt_data *sd);
sys/netpfil/ipfw/ip_fw_table_value.c
85
struct sockopt_data *sd;
sys/netpfil/ipfw/nat64/nat64clat_control.c
107
struct sockopt_data *sd;
sys/netpfil/ipfw/nat64/nat64clat_control.c
117
uc = (ipfw_nat64clat_cfg *)ipfw_get_sopt_space(da->sd, sizeof(*uc));
sys/netpfil/ipfw/nat64/nat64clat_control.c
142
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64clat_control.c
149
if (sd->valsize != sizeof(*olh) + sizeof(*uc))
sys/netpfil/ipfw/nat64/nat64clat_control.c
152
olh = (ipfw_obj_lheader *)sd->kbuf;
sys/netpfil/ipfw/nat64/nat64clat_control.c
213
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64clat_control.c
221
if (sd->valsize != sizeof(*oh) + sizeof(*uc))
sys/netpfil/ipfw/nat64/nat64clat_control.c
224
oh = (ipfw_obj_header *)ipfw_get_sopt_space(sd,
sys/netpfil/ipfw/nat64/nat64clat_control.c
233
if (sd->sopt->sopt_dir == SOPT_GET) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
314
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64clat_control.c
319
if (sd->valsize != sizeof(*oh))
sys/netpfil/ipfw/nat64/nat64clat_control.c
322
oh = (ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/nat64/nat64clat_control.c
356
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64clat_control.c
362
if (sd->valsize < sizeof(ipfw_obj_lheader))
sys/netpfil/ipfw/nat64/nat64clat_control.c
365
olh = (ipfw_obj_lheader *)ipfw_get_sopt_header(sd, sizeof(*olh));
sys/netpfil/ipfw/nat64/nat64clat_control.c
373
if (sd->valsize < olh->size) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
379
da.sd = sd;
sys/netpfil/ipfw/nat64/nat64clat_control.c
416
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64clat_control.c
425
if (sd->valsize % sizeof(uint64_t))
sys/netpfil/ipfw/nat64/nat64clat_control.c
427
if (sd->valsize < sz)
sys/netpfil/ipfw/nat64/nat64clat_control.c
429
oh = (ipfw_obj_header *)ipfw_get_sopt_header(sd, sz);
sys/netpfil/ipfw/nat64/nat64clat_control.c
463
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64clat_control.c
468
if (sd->valsize != sizeof(*oh))
sys/netpfil/ipfw/nat64/nat64clat_control.c
470
oh = (ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
112
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
121
if (sd->valsize != sizeof(*olh) + sizeof(*uc))
sys/netpfil/ipfw/nat64/nat64lsn_control.c
124
olh = (ipfw_obj_lheader *)sd->kbuf;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
235
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
240
if (sd->valsize != sizeof(*oh))
sys/netpfil/ipfw/nat64/nat64lsn_control.c
339
struct sockopt_data *sd;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
350
uc = (struct _ipfw_nat64lsn_cfg *)ipfw_get_sopt_space(da->sd,
sys/netpfil/ipfw/nat64/nat64lsn_control.c
367
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
373
if (sd->valsize < sizeof(ipfw_obj_lheader))
sys/netpfil/ipfw/nat64/nat64lsn_control.c
376
olh = (ipfw_obj_lheader *)ipfw_get_sopt_header(sd, sizeof(*olh));
sys/netpfil/ipfw/nat64/nat64lsn_control.c
384
if (sd->valsize < olh->size) {
sys/netpfil/ipfw/nat64/nat64lsn_control.c
390
da.sd = sd;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
408
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
416
if (sd->valsize != sizeof(*oh) + sizeof(*uc))
sys/netpfil/ipfw/nat64/nat64lsn_control.c
419
oh = (ipfw_obj_header *)ipfw_get_sopt_space(sd,
sys/netpfil/ipfw/nat64/nat64lsn_control.c
428
if (sd->sopt->sopt_dir == SOPT_GET) {
sys/netpfil/ipfw/nat64/nat64lsn_control.c
482
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
491
if (sd->valsize % sizeof(uint64_t))
sys/netpfil/ipfw/nat64/nat64lsn_control.c
493
if (sd->valsize < sz)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
495
oh = (ipfw_obj_header *)ipfw_get_sopt_header(sd, sz);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
530
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
535
if (sd->valsize != sizeof(*oh))
sys/netpfil/ipfw/nat64/nat64lsn_control.c
537
oh = (ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
565
struct nat64lsn_pg *pg, struct sockopt_data *sd, uint32_t *ret_count)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
584
s = (ipfw_nat64lsn_state_v1 *)ipfw_get_sopt_space(sd,
sys/netpfil/ipfw/nat64/nat64lsn_control.c
687
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
703
if (sd->valsize < sz)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
706
oh = (ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
738
if (sd->valsize < sz) {
sys/netpfil/ipfw/nat64/nat64lsn_control.c
742
oh = (ipfw_obj_header *)ipfw_get_sopt_space(sd, sz);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
760
sd, &count);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
786
if (sd->valsize < sz) {
sys/netpfil/ipfw/nat64/nat64lsn_control.c
792
stg = (ipfw_nat64lsn_stg_v1 *)ipfw_get_sopt_space(sd,
sys/netpfil/ipfw/nat64/nat64stl_control.c
114
struct sockopt_data *sd;
sys/netpfil/ipfw/nat64/nat64stl_control.c
124
uc = (ipfw_nat64stl_cfg *)ipfw_get_sopt_space(da->sd, sizeof(*uc));
sys/netpfil/ipfw/nat64/nat64stl_control.c
173
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64stl_control.c
181
if (sd->valsize != sizeof(*olh) + sizeof(*uc))
sys/netpfil/ipfw/nat64/nat64stl_control.c
184
olh = (ipfw_obj_lheader *)sd->kbuf;
sys/netpfil/ipfw/nat64/nat64stl_control.c
249
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64stl_control.c
256
if (sd->valsize != sizeof(*oh) + sizeof(*uc))
sys/netpfil/ipfw/nat64/nat64stl_control.c
259
oh = (ipfw_obj_header *)ipfw_get_sopt_space(sd,
sys/netpfil/ipfw/nat64/nat64stl_control.c
268
if (sd->sopt->sopt_dir == SOPT_GET) {
sys/netpfil/ipfw/nat64/nat64stl_control.c
319
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64stl_control.c
324
if (sd->valsize != sizeof(*oh))
sys/netpfil/ipfw/nat64/nat64stl_control.c
327
oh = (ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/nat64/nat64stl_control.c
361
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64stl_control.c
367
if (sd->valsize < sizeof(ipfw_obj_lheader))
sys/netpfil/ipfw/nat64/nat64stl_control.c
370
olh = (ipfw_obj_lheader *)ipfw_get_sopt_header(sd, sizeof(*olh));
sys/netpfil/ipfw/nat64/nat64stl_control.c
378
if (sd->valsize < olh->size) {
sys/netpfil/ipfw/nat64/nat64stl_control.c
384
da.sd = sd;
sys/netpfil/ipfw/nat64/nat64stl_control.c
421
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64stl_control.c
430
if (sd->valsize % sizeof(uint64_t))
sys/netpfil/ipfw/nat64/nat64stl_control.c
432
if (sd->valsize < sz)
sys/netpfil/ipfw/nat64/nat64stl_control.c
434
oh = (ipfw_obj_header *)ipfw_get_sopt_header(sd, sz);
sys/netpfil/ipfw/nat64/nat64stl_control.c
468
struct sockopt_data *sd)
sys/netpfil/ipfw/nat64/nat64stl_control.c
473
if (sd->valsize != sizeof(*oh))
sys/netpfil/ipfw/nat64/nat64stl_control.c
475
oh = (ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/nptv6/nptv6.c
459
struct sockopt_data *sd;
sys/netpfil/ipfw/nptv6/nptv6.c
469
uc = (ipfw_nptv6_cfg *)ipfw_get_sopt_space(da->sd, sizeof(*uc));
sys/netpfil/ipfw/nptv6/nptv6.c
649
struct sockopt_data *sd)
sys/netpfil/ipfw/nptv6/nptv6.c
657
if (sd->valsize != sizeof(*olh) + sizeof(*uc))
sys/netpfil/ipfw/nptv6/nptv6.c
660
olh = (ipfw_obj_lheader *)sd->kbuf;
sys/netpfil/ipfw/nptv6/nptv6.c
725
struct sockopt_data *sd)
sys/netpfil/ipfw/nptv6/nptv6.c
730
if (sd->valsize != sizeof(*oh))
sys/netpfil/ipfw/nptv6/nptv6.c
733
oh = (ipfw_obj_header *)sd->kbuf;
sys/netpfil/ipfw/nptv6/nptv6.c
764
struct sockopt_data *sd)
sys/netpfil/ipfw/nptv6/nptv6.c
780
struct sockopt_data *sd)
sys/netpfil/ipfw/nptv6/nptv6.c
786
if (sd->valsize < sizeof(ipfw_obj_lheader))
sys/netpfil/ipfw/nptv6/nptv6.c
789
olh = (ipfw_obj_lheader *)ipfw_get_sopt_header(sd, sizeof(*olh));
sys/netpfil/ipfw/nptv6/nptv6.c
797
if (sd->valsize < olh->size) {
sys/netpfil/ipfw/nptv6/nptv6.c
803
da.sd = sd;
sys/netpfil/ipfw/nptv6/nptv6.c
833
struct sockopt_data *sd)
sys/netpfil/ipfw/nptv6/nptv6.c
842
if (sd->valsize % sizeof(uint64_t))
sys/netpfil/ipfw/nptv6/nptv6.c
844
if (sd->valsize < sz)
sys/netpfil/ipfw/nptv6/nptv6.c
846
oh = (ipfw_obj_header *)ipfw_get_sopt_header(sd, sz);
sys/netpfil/ipfw/nptv6/nptv6.c
883
struct sockopt_data *sd)
sys/netpfil/ipfw/nptv6/nptv6.c
888
if (sd->valsize != sizeof(*oh))
sys/netpfil/ipfw/nptv6/nptv6.c
890
oh = (ipfw_obj_header *)sd->kbuf;
sys/riscv/include/asm.h
62
sd handler, PCB_ONFAULT(tmp) /* Set the handler */
sys/riscv/include/encoding.h
808
DECLARE_INSN(sd, MATCH_SD, MASK_SD)
sys/sys/sysent.h
308
int syscall_helper_register(struct syscall_helper_data *sd, int flags);
sys/sys/sysent.h
309
int syscall_helper_unregister(struct syscall_helper_data *sd);
sys/sys/sysent.h
318
struct syscall_helper_data *sd, int flags);
sys/sys/sysent.h
320
struct syscall_helper_data *sd);
sys/sys/sysproto.h
1295
char sd_l_[PADL_(int)]; int sd; char sd_r_[PADR_(int)];
sys/sys/sysproto.h
1299
char sd_l_[PADL_(int)]; int sd; char sd_r_[PADR_(int)];
sys/sys/sysproto.h
1308
char sd_l_[PADL_(int)]; int sd; char sd_r_[PADR_(int)];
sys/sys/sysproto.h
1317
char sd_l_[PADL_(int)]; int sd; char sd_r_[PADR_(int)];
sys/x86/include/segments.h
114
struct segment_descriptor sd;
sys/x86/include/segments.h
138
struct user_segment_descriptor sd;
sys/x86/include/segments.h
88
#define USD_GETBASE(sd) (((sd)->sd_lobase) | (sd)->sd_hibase << 24)
sys/x86/include/segments.h
89
#define USD_SETBASE(sd, b) (sd)->sd_lobase = (b); \
sys/x86/include/segments.h
90
(sd)->sd_hibase = ((b) >> 24);
sys/x86/include/segments.h
91
#define USD_GETLIMIT(sd) (((sd)->sd_lolimit) | (sd)->sd_hilimit << 16)
sys/x86/include/segments.h
92
#define USD_SETLIMIT(sd, l) (sd)->sd_lolimit = (l); \
sys/x86/include/segments.h
93
(sd)->sd_hilimit = ((l) >> 16);
sys/x86/iommu/amd_reg.h
303
u_int sd:1; /* Snoop Disable */
tests/sys/file/path_test.c
685
int error, fd, pathfd, sd[2];
tests/sys/file/path_test.c
732
ATF_REQUIRE_MSG(socketpair(PF_LOCAL, SOCK_STREAM, 0, sd) == 0,
tests/sys/file/path_test.c
735
sendfile(pathfd, sd[0], 0, 0, NULL, NULL, 0));
tests/sys/file/path_test.c
736
CHECKED_CLOSE(sd[0]);
tests/sys/file/path_test.c
737
CHECKED_CLOSE(sd[1]);
tests/sys/file/path_test.c
870
int flags, pathfd, pathfd_copy, sd[2];
tests/sys/file/path_test.c
873
ATF_REQUIRE_MSG(socketpair(PF_LOCAL, SOCK_STREAM, 0, sd) == 0,
tests/sys/file/path_test.c
900
ATF_REQUIRE_MSG(sendmsg(sd[0], &msg, 0) == sizeof(c),
tests/sys/file/path_test.c
910
ATF_REQUIRE_MSG(recvmsg(sd[1], &msg, 0) == 1,
tests/sys/file/path_test.c
927
CHECKED_CLOSE(sd[0]);
tests/sys/file/path_test.c
928
CHECKED_CLOSE(sd[1]);
tests/sys/file/path_test.c
939
int kq, pathfd, sd;
tests/sys/file/path_test.c
944
sd = socket(PF_LOCAL, SOCK_STREAM, 0);
tests/sys/file/path_test.c
945
ATF_REQUIRE_MSG(sd >= 0, FMT_ERR("socket"));
tests/sys/file/path_test.c
950
ATF_REQUIRE_MSG(bind(sd, (struct sockaddr *)&sun, SUN_LEN(&sun)) == 0,
tests/sys/file/path_test.c
977
CHECKED_CLOSE(sd);
tests/sys/kern/socket_msg_trunc.c
168
int error, fd, sd[2];
tests/sys/kern/socket_msg_trunc.c
172
error = socketpair(AF_UNIX, SOCK_DGRAM, 0, sd);
tests/sys/kern/socket_msg_trunc.c
176
nbytes = send(sd[0], buf, sizeof(buf), 0);
tests/sys/kern/socket_msg_trunc.c
191
nbytes = recvmsg(sd[1], &msg, MSG_TRUNC);
tests/sys/kern/socket_msg_trunc.c
206
ATF_REQUIRE(close(sd[0]) == 0);
tests/sys/kern/socket_msg_trunc.c
207
ATF_REQUIRE(close(sd[1]) == 0);
tests/sys/kern/socket_splice.c
100
error = bind(sd[0], sinp, sinp->sa_len);
tests/sys/kern/socket_splice.c
102
error = listen(sd[0], 1);
tests/sys/kern/socket_splice.c
105
error = getsockname(sd[0], sinp, &(socklen_t){ sinp->sa_len });
tests/sys/kern/socket_splice.c
108
error = connect(sd[1], sinp, sinp->sa_len);
tests/sys/kern/socket_splice.c
110
out[0] = accept(sd[0], NULL, NULL);
tests/sys/kern/socket_splice.c
112
checked_close(sd[0]);
tests/sys/kern/socket_splice.c
113
out[1] = sd[1];
tests/sys/kern/socket_splice.c
129
nspliced(int sd)
tests/sys/kern/socket_splice.c
136
error = getsockopt(sd, SOL_SOCKET, SO_SPLICE, &n, &len);
tests/sys/kern/socket_splice.c
145
#define check_nspliced(sd, n) do { \
tests/sys/kern/socket_splice.c
148
sofar = nspliced(sd); \
tests/sys/kern/socket_splice.c
392
int error, fd, sd, usd[2];
tests/sys/kern/socket_splice.c
456
sd = socket(PF_INET, SOCK_STREAM, 0);
tests/sys/kern/socket_splice.c
457
ATF_REQUIRE_MSG(sd >= 0, "socket failed: %s", strerror(errno));
tests/sys/kern/socket_splice.c
458
splice_init(&sp, sd, 0, NULL);
tests/sys/kern/socket_splice.c
462
error = setsockopt(sd, SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp));
tests/sys/kern/socket_splice.c
621
int error, sd[3];
tests/sys/kern/socket_splice.c
634
tcp4_socketpair(sd);
tests/sys/kern/socket_splice.c
635
sd[2] = socket(PF_INET, SOCK_STREAM, 0);
tests/sys/kern/socket_splice.c
636
ATF_REQUIRE_MSG(sd[2] >= 0, "socket failed: %s", strerror(errno));
tests/sys/kern/socket_splice.c
637
error = listen(sd[2], 1);
tests/sys/kern/socket_splice.c
643
splice_init(&sp, sd[2], 0, NULL);
tests/sys/kern/socket_splice.c
644
error = setsockopt(sd[1], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp));
tests/sys/kern/socket_splice.c
646
splice_init(&sp, sd[1], 0, NULL);
tests/sys/kern/socket_splice.c
647
error = setsockopt(sd[2], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp));
tests/sys/kern/socket_splice.c
654
error = setsockopt(sd[2], SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp));
tests/sys/kern/socket_splice.c
657
checked_close(sd[0]);
tests/sys/kern/socket_splice.c
658
checked_close(sd[1]);
tests/sys/kern/socket_splice.c
659
checked_close(sd[2]);
tests/sys/kern/socket_splice.c
675
int sd[2], status;
tests/sys/kern/socket_splice.c
679
tcp_socketpair(sd, PF_INET);
tests/sys/kern/socket_splice.c
680
splice_pair(sd[0], sd[1], 0, NULL);
tests/sys/kern/socket_splice.c
69
int error, sd[2];
tests/sys/kern/socket_splice.c
692
n = write(sd[0], &c, 1);
tests/sys/kern/socket_splice.c
696
n = write(sd[1], &c, 1);
tests/sys/kern/socket_splice.c
707
checked_close(sd[0]);
tests/sys/kern/socket_splice.c
708
checked_close(sd[1]);
tests/sys/kern/socket_splice.c
71
sd[0] = socket(domain, SOCK_STREAM, 0);
tests/sys/kern/socket_splice.c
72
ATF_REQUIRE_MSG(sd[0] >= 0, "socket failed: %s", strerror(errno));
tests/sys/kern/socket_splice.c
73
sd[1] = socket(domain, SOCK_STREAM, 0);
tests/sys/kern/socket_splice.c
74
ATF_REQUIRE_MSG(sd[1] >= 0, "socket failed: %s", strerror(errno));
tests/sys/kern/socket_splice.c
76
error = setsockopt(sd[0], IPPROTO_TCP, TCP_NODELAY, &(int){ 1 },
tests/sys/kern/socket_splice.c
79
error = setsockopt(sd[1], IPPROTO_TCP, TCP_NODELAY, &(int){ 1 },
tests/sys/kern/unix_dgram.c
375
int sd;
tests/sys/kern/unix_dgram.c
379
sd = socket(PF_UNIX, SOCK_DGRAM, 0);
tests/sys/kern/unix_dgram.c
380
ATF_REQUIRE(sd != -1);
tests/sys/kern/unix_dgram.c
386
ATF_REQUIRE(bind(sd, (struct sockaddr *)&sun, sizeof(sun)) == 0);
tests/sys/kern/unix_dgram.c
387
ATF_REQUIRE(connect(sd, (struct sockaddr *)&sun, sizeof(sun)) == 0);
tests/sys/kern/unix_dgram.c
390
ATF_REQUIRE(getpeername(sd, (struct sockaddr *)&sun, &len) == 0);
tests/sys/kern/unix_dgram.c
393
ATF_REQUIRE(close(sd) == 0);
tests/sys/kern/unix_dgram.c
401
int error, sd;
tests/sys/kern/unix_dgram.c
408
sd = socket(PF_UNIX, SOCK_DGRAM, 0);
tests/sys/kern/unix_dgram.c
409
ATF_REQUIRE(sd != -1);
tests/sys/kern/unix_dgram.c
411
error = fchmod(sd, 0600 | S_ISUID);
tests/sys/kern/unix_dgram.c
415
error = fchmod(sd, 0766);
tests/sys/kern/unix_dgram.c
418
error = bind(sd, (struct sockaddr *)&sun, sizeof(sun));
tests/sys/kern/unix_dgram.c
426
error = fchmod(sd, 0666);
tests/sys/kern/unix_dgram.c
429
ATF_REQUIRE(close(sd) == 0);
tests/sys/netinet/ip6_mrouted.c
117
len = recv(sd, &msg, sizeof(msg), 0);
tests/sys/netinet/ip6_mrouted.c
131
add_route(sd, &msg.im6_src, &msg.im6_dst, msg.im6_mif);
tests/sys/netinet/ip6_mrouted.c
141
int ch, error, mifi, sd, v;
tests/sys/netinet/ip6_mrouted.c
163
sd = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
tests/sys/netinet/ip6_mrouted.c
164
if (sd < 0)
tests/sys/netinet/ip6_mrouted.c
168
error = setsockopt(sd, IPPROTO_IPV6, MRT6_INIT, &v, sizeof(v));
tests/sys/netinet/ip6_mrouted.c
178
error = setsockopt(sd, IPPROTO_IPV6, MRT6_ADD_MIF,
tests/sys/netinet/ip6_mrouted.c
184
handle_upcalls(sd);
tests/sys/netinet/ip6_mrouted.c
186
error = setsockopt(sd, IPPROTO_IPV6, MRT6_DONE, NULL, 0);
tests/sys/netinet/ip6_mrouted.c
60
add_route(int sd, const struct in6_addr *src, const struct in6_addr *group,
tests/sys/netinet/ip6_mrouted.c
81
error = setsockopt(sd, IPPROTO_IPV6, MRT6_ADD_MFC,
tests/sys/netinet/ip6_mrouted.c
88
handle_upcalls(int sd)
tests/sys/netinet/ip6_mrouted.c
96
EV_SET(&ev, sd, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, NULL);
tests/sys/netinet/so_reuseport_lb_test.c
107
error = close(sd);
tests/sys/netinet/so_reuseport_lb_test.c
120
int error, sd;
tests/sys/netinet/so_reuseport_lb_test.c
122
sd = socket(domain, SOCK_STREAM | flags, 0);
tests/sys/netinet/so_reuseport_lb_test.c
123
ATF_REQUIRE_MSG(sd >= 0, "socket() failed: %s", strerror(errno));
tests/sys/netinet/so_reuseport_lb_test.c
126
error = setsockopt(sd, SOL_SOCKET, SO_REUSEPORT_LB, &one, sizeof(one));
tests/sys/netinet/so_reuseport_lb_test.c
130
return (sd);
tests/sys/netinet/so_reuseport_lb_test.c
59
int csd, error, excnt, sd;
tests/sys/netinet/so_reuseport_lb_test.c
72
sd = socket(domain, SOCK_STREAM, 0);
tests/sys/netinet/so_reuseport_lb_test.c
73
ATF_REQUIRE_MSG(sd >= 0, "socket() failed: %s",
tests/sys/netinet/so_reuseport_lb_test.c
76
error = connect(sd, addr, addr->sa_len);
tests/sys/netinet/so_reuseport_lb_test.c
80
error = setsockopt(sd, SOL_SOCKET, SO_LINGER, &lopt, sizeof(lopt));
tests/sys/netinet/socket_afinet.c
46
int sd;
tests/sys/netinet/socket_afinet.c
48
sd = socket(PF_INET, SOCK_DGRAM, 0);
tests/sys/netinet/socket_afinet.c
49
ATF_CHECK(sd >= 0);
tests/sys/netinet/socket_afinet.c
51
close(sd);
tests/sys/netinet/socket_afinet.c
519
int error, sd[3], tmp;
tests/sys/netinet/socket_afinet.c
525
sd[0] = socket(domain, SOCK_STREAM, 0);
tests/sys/netinet/socket_afinet.c
526
ATF_REQUIRE_MSG(sd[0] >= 0, "socket failed: %s", strerror(errno));
tests/sys/netinet/socket_afinet.c
527
sd[1] = socket(domain, SOCK_STREAM, 0);
tests/sys/netinet/socket_afinet.c
528
ATF_REQUIRE_MSG(sd[1] >= 0, "socket failed: %s", strerror(errno));
tests/sys/netinet/socket_afinet.c
546
error = bind(sd[0], sinp, sinp->sa_len);
tests/sys/netinet/socket_afinet.c
548
error = listen(sd[0], 1);
tests/sys/netinet/socket_afinet.c
551
error = getsockname(sd[0], sinp, &(socklen_t){ sinp->sa_len });
tests/sys/netinet/socket_afinet.c
557
error = connect(sd[1], sinp, sinp->sa_len);
tests/sys/netinet/socket_afinet.c
559
tmp = accept(sd[0], NULL, NULL);
tests/sys/netinet/socket_afinet.c
561
ATF_REQUIRE(close(sd[0]) == 0);
tests/sys/netinet/socket_afinet.c
562
sd[0] = tmp;
tests/sys/netinet/socket_afinet.c
57
int sd, rc;
tests/sys/netinet/socket_afinet.c
63
sd = socket(PF_INET, SOCK_DGRAM, 0);
tests/sys/netinet/socket_afinet.c
64
ATF_CHECK(sd >= 0);
tests/sys/netinet/socket_afinet.c
72
rc = bind(sd, (struct sockaddr *)&sin, sizeof(sin));
tests/sys/netinet/socket_afinet.c
75
close(sd);
tests/sys/netinet/socket_afinet.c
81
int sd, rc;
tests/sys/netinet/socket_afinet.c
84
sd = socket(PF_INET, SOCK_DGRAM, 0);
tests/sys/netinet/socket_afinet.c
85
ATF_CHECK(sd >= 0);
tests/sys/netinet/socket_afinet.c
92
rc = bind(sd, (struct sockaddr *)&sin, sizeof(sin));
tests/sys/netinet/socket_afinet.c
95
close(sd);
tools/regression/priv/priv_netinet_ipsec.c
119
sd = socket(AF_INET, SOCK_DGRAM, 0);
tools/regression/priv/priv_netinet_ipsec.c
120
if (sd < 0) {
tools/regression/priv/priv_netinet_ipsec.c
127
sd = socket(AF_INET6, SOCK_DGRAM, 0);
tools/regression/priv/priv_netinet_ipsec.c
128
if (sd < 0) {
tools/regression/priv/priv_netinet_ipsec.c
213
error = setsockopt(sd, level, optname,
tools/regression/priv/priv_netinet_ipsec.c
266
error = setsockopt(sd, level, optname,
tools/regression/priv/priv_netinet_ipsec.c
307
if (sd >= 0) {
tools/regression/priv/priv_netinet_ipsec.c
308
close(sd);
tools/regression/priv/priv_netinet_ipsec.c
309
sd = -1;
tools/regression/priv/priv_netinet_ipsec.c
322
if (sd >= 0) {
tools/regression/priv/priv_netinet_ipsec.c
323
close(sd);
tools/regression/priv/priv_netinet_ipsec.c
324
sd = -1;
tools/regression/priv/priv_netinet_ipsec.c
49
static int sd = -1;
tools/regression/priv/priv_netinet_ipsec.c
64
sd = socket(AF_INET, SOCK_DGRAM, 0);
tools/regression/priv/priv_netinet_ipsec.c
65
if (sd < 0) {
tools/regression/priv/priv_netinet_ipsec.c
72
sd = socket(AF_INET6, SOCK_DGRAM, 0);
tools/regression/priv/priv_netinet_ipsec.c
73
if (sd < 0) {
tools/tools/net80211/mlme_assoc/mlme_assoc.c
106
error = ioctl(sd, SIOCS80211, &ireq);
tools/tools/net80211/mlme_assoc/mlme_assoc.c
116
mlme_assoc_scan_results(int sd, const char *ifnam)
tools/tools/net80211/mlme_assoc/mlme_assoc.c
130
error = ioctl(sd, SIOCG80211, &ireq);
tools/tools/net80211/mlme_assoc/mlme_assoc.c
143
error = try_mlme_assoc(sd, ifnam, (void *)(sr + 1), sr->isr_ssid_len,
tools/tools/net80211/mlme_assoc/mlme_assoc.c
162
int error, sd;
tools/tools/net80211/mlme_assoc/mlme_assoc.c
178
sd = socket(AF_LOCAL, SOCK_DGRAM, 0);
tools/tools/net80211/mlme_assoc/mlme_assoc.c
179
if (sd == -1)
tools/tools/net80211/mlme_assoc/mlme_assoc.c
182
error = if_up(sd, ifnam);
tools/tools/net80211/mlme_assoc/mlme_assoc.c
187
error = try_mlme_assoc(sd, ifnam, ssid, strlen((const char *)ssid), bssid);
tools/tools/net80211/mlme_assoc/mlme_assoc.c
192
error = mlme_assoc_scan_results(sd, ifnam);
tools/tools/net80211/mlme_assoc/mlme_assoc.c
197
close(sd);
tools/tools/net80211/mlme_assoc/mlme_assoc.c
56
if_up(int sd, const char *ifnam)
tools/tools/net80211/mlme_assoc/mlme_assoc.c
64
error = ioctl(sd, SIOCGIFFLAGS, &ifr);
tools/tools/net80211/mlme_assoc/mlme_assoc.c
75
error = ioctl(sd, SIOCSIFFLAGS, &ifr);
tools/tools/net80211/mlme_assoc/mlme_assoc.c
85
try_mlme_assoc(int sd, const char *ifnam, uint8_t *ssid, uint8_t ssid_len, uint8_t *bssid)
tools/tools/so_splice/proxy.c
178
int sd[2];
tools/tools/so_splice/proxy.c
180
sd[0] = socket(af, SOCK_STREAM, 0);
tools/tools/so_splice/proxy.c
181
if (sd[0] == -1)
tools/tools/so_splice/proxy.c
183
sd[1] = socket(af, SOCK_STREAM, 0);
tools/tools/so_splice/proxy.c
184
if (sd[1] == -1)
tools/tools/so_splice/proxy.c
187
nodelay(sd[0]);
tools/tools/so_splice/proxy.c
188
nodelay(sd[1]);
tools/tools/so_splice/proxy.c
208
if (bind(sd[0], sa, sa->sa_len) == -1)
tools/tools/so_splice/proxy.c
210
if (listen(sd[0], 1) == -1)
tools/tools/so_splice/proxy.c
213
if (getsockname(sd[0], sa, &(socklen_t){sa->sa_len}) == -1)
tools/tools/so_splice/proxy.c
215
if (connect(sd[1], sa, sa->sa_len) == -1)
tools/tools/so_splice/proxy.c
218
out[0] = sd[1];
tools/tools/so_splice/proxy.c
219
out[1] = accept(sd[0], NULL, NULL);
tools/tools/so_splice/proxy.c
222
close(sd[0]);
usr.bin/ministat/ministat.c
346
double av, sd;
usr.bin/ministat/ministat.c
403
sd = Stddev(ds);
usr.bin/ministat/ministat.c
404
if (!isnan(sd)) {
usr.bin/ministat/ministat.c
405
x = ((av - sd) - pl->x0) / pl->dx;
usr.bin/ministat/ministat.c
406
m = ((av + sd) - pl->x0) / pl->dx;
usr.sbin/bhyve/amd64/task_switch.c
467
update_seg_desc(struct vcpu *vcpu, int reg, struct seg_desc *sd)
usr.sbin/bhyve/amd64/task_switch.c
471
error = vm_set_desc(vcpu, reg, sd->base, sd->limit, sd->access);
usr.sbin/bhyve/slirp/slirp-helper.c
463
int ch, fd, sd;
usr.sbin/bhyve/slirp/slirp-helper.c
467
sd = -1;
usr.sbin/bhyve/slirp/slirp-helper.c
471
sd = atoi(optarg);
usr.sbin/bhyve/slirp/slirp-helper.c
472
if (fcntl(sd, F_GETFD) == -1)
usr.sbin/bhyve/slirp/slirp-helper.c
483
if (sd == -1)
usr.sbin/bhyve/slirp/slirp-helper.c
498
if (dup2(sd, 3) == -1)
usr.sbin/bhyve/slirp/slirp-helper.c
500
sd = 3;
usr.sbin/bhyve/slirp/slirp-helper.c
501
closefrom(sd + 1);
usr.sbin/bhyve/slirp/slirp-helper.c
504
priv.sock = sd;
usr.sbin/bhyve/slirp/slirp-helper.c
513
config = nvlist_recv(sd, 0);
usr.sbin/bluetooth/sdpd/provider.c
56
provider_p sd = calloc(1, sizeof(*sd));
usr.sbin/bluetooth/sdpd/provider.c
59
if (sd == NULL || bgd == NULL) {
usr.sbin/bluetooth/sdpd/provider.c
60
if (sd != NULL)
usr.sbin/bluetooth/sdpd/provider.c
61
free(sd);
usr.sbin/bluetooth/sdpd/provider.c
69
sd->profile = &sd_profile_descriptor;
usr.sbin/bluetooth/sdpd/provider.c
71
sd->fd = fd;
usr.sbin/bluetooth/sdpd/provider.c
72
TAILQ_INSERT_HEAD(&providers, sd, provider_next);
usr.sbin/bluetooth/sdpd/provider.c
76
sd->fd = fd;
usr.sbin/bluetooth/sdpd/provider.c
77
TAILQ_INSERT_AFTER(&providers, sd, bgd, provider_next);
usr.sbin/ipfwpcap/ipfwpcap.c
150
int r, sd, portnum, l;
usr.sbin/ipfwpcap/ipfwpcap.c
203
sd = r;
usr.sbin/ipfwpcap/ipfwpcap.c
209
if (bind(sd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
usr.sbin/ipfwpcap/ipfwpcap.c
223
nfd = sd + 1;
usr.sbin/ipfwpcap/ipfwpcap.c
226
FD_SET(sd, &rds);
usr.sbin/ipfwpcap/ipfwpcap.c
235
if (!FD_ISSET(sd, &rds))
usr.sbin/ipfwpcap/ipfwpcap.c
249
nr = recvfrom(sd, buf, sizeof(buf), 0, (struct sockaddr *)&sin, &l);
usr.sbin/ipfwpcap/ipfwpcap.c
250
if (debug) fprintf(stderr, "recvfrom(%d) = %zd (%d)\n", sd, nr, l);
usr.sbin/ipfwpcap/ipfwpcap.c
263
r = sendto(sd, buf, nr, 0, (struct sockaddr *)&sin, l);
usr.sbin/ipfwpcap/ipfwpcap.c
264
if (debug) fprintf(stderr, " sendto(%d) = %d\n", sd, r);
usr.sbin/lpr/chkprintcap/chkprintcap.c
288
char *sd = pp->spool_dir;
usr.sbin/lpr/chkprintcap/chkprintcap.c
292
if (mkdir(sd, S_IRUSR | S_IXUSR) < 0) {
usr.sbin/lpr/chkprintcap/chkprintcap.c
294
warn("%s: mkdir %s", pp->printer, sd);
usr.sbin/lpr/chkprintcap/chkprintcap.c
301
if (chown(sd, pp->daemon_user, gr->gr_gid) < 0) {
usr.sbin/lpr/chkprintcap/chkprintcap.c
303
warn("%s: cannot change ownership to %ld:%ld", sd,
usr.sbin/lpr/chkprintcap/chkprintcap.c
308
if (chmod(sd, SPOOL_DIR_MODE) < 0) {
usr.sbin/lpr/chkprintcap/chkprintcap.c
310
warn("%s: cannot change mode to %lo", sd, (long)SPOOL_DIR_MODE);
usr.sbin/lpr/chkprintcap/chkprintcap.c
313
if (stat(sd, &stab) < 0)
usr.sbin/lpr/chkprintcap/chkprintcap.c
314
err(++problems, "stat: %s", sd);