| /freebsd/contrib/tcpdump/ |
| H A D | print-domain.c | 66 const u_char *cp) in ns_nskip() argument 70 if (!ND_TTEST_1(cp)) in ns_nskip() 72 i = GET_U_1(cp); in ns_nskip() 73 cp++; in ns_nskip() 78 return (cp + 1); in ns_nskip() 85 if (!ND_TTEST_1(cp)) in ns_nskip() 87 if ((bitlen = GET_U_1(cp)) == 0) in ns_nskip() 89 cp++; in ns_nskip() 91 cp += bytelen; in ns_nskip() 99 cp += i; in ns_nskip() [all …]
|
| H A D | print-aoe.c | 143 const u_char *cp, u_int len) in aoev1_issue_print() argument 149 bittok2str(aoev1_aflag_bitmap_str, "none", GET_U_1(cp))); in aoev1_issue_print() 150 cp += 1; in aoev1_issue_print() 153 ND_PRINT(", Err/Feature: %u", GET_U_1(cp)); in aoev1_issue_print() 154 cp += 1; in aoev1_issue_print() 157 ND_PRINT(", Sector Count: %u", GET_U_1(cp)); in aoev1_issue_print() 158 cp += 1; in aoev1_issue_print() 161 ND_PRINT(", Cmd/Status: %u", GET_U_1(cp)); in aoev1_issue_print() 162 cp += 1; in aoev1_issue_print() 165 ND_PRINT("\n\tlba0: %u", GET_U_1(cp)); in aoev1_issue_print() [all …]
|
| H A D | print-openflow-1.0.c | 696 const u_char *cp, u_int len) in of10_bsn_message_print() argument 703 subtype = GET_BE_U_4(cp); in of10_bsn_message_print() 722 ND_PRINT(", index %u", GET_U_1(cp)); in of10_bsn_message_print() 726 ND_TCHECK_7(cp); in of10_bsn_message_print() 744 ND_PRINT(", index %u", GET_U_1(cp)); in of10_bsn_message_print() 749 ND_PRINT(", mask %s", GET_IPADDR_STRING(cp)); in of10_bsn_message_print() 767 tok2str(bsn_onoff_str, "bogus (%u)", GET_U_1(cp))); in of10_bsn_message_print() 771 ND_TCHECK_3(cp); in of10_bsn_message_print() 801 ND_PRINT(", vport_no %u", GET_BE_U_4(cp)); in of10_bsn_message_print() 818 ND_PRINT(", service %u", GET_BE_U_4(cp)); in of10_bsn_message_print() [all …]
|
| H A D | print-ahcp.c | 100 const u_char *cp, uint8_t len) in ahcp_time_print() argument 107 t = GET_BE_U_4(cp); in ahcp_time_print() 115 ND_TCHECK_LEN(cp, len); in ahcp_time_print() 120 const u_char *cp, uint8_t len) in ahcp_seconds_print() argument 124 ND_PRINT(": %us", GET_BE_U_4(cp)); in ahcp_seconds_print() 129 ND_TCHECK_LEN(cp, len); in ahcp_seconds_print() 134 const u_char *cp, uint8_t len) in ahcp_ipv6_addresses_print() argument 141 ND_PRINT("%s%s", sep, GET_IP6ADDR_STRING(cp)); in ahcp_ipv6_addresses_print() 142 cp += 16; in ahcp_ipv6_addresses_print() 150 ND_TCHECK_LEN(cp, len); in ahcp_ipv6_addresses_print() [all …]
|
| H A D | print-openflow-1.3.c | 647 const u_char *cp) in of13_port_print() argument 651 tok2str(ofpp_str, "%u", GET_BE_U_4(cp))); in of13_port_print() 652 cp += 4; in of13_port_print() 654 cp += 4; in of13_port_print() 656 ND_PRINT(", hw_addr %s", GET_ETHERADDR_STRING(cp)); in of13_port_print() 657 cp += MAC_ADDR_LEN; in of13_port_print() 659 cp += 2; in of13_port_print() 662 nd_printjnp(ndo, cp, OFP_MAX_PORT_NAME_LEN); in of13_port_print() 664 cp += OFP_MAX_PORT_NAME_LEN; in of13_port_print() 667 ND_TCHECK_LEN(cp, 32); in of13_port_print() [all …]
|
| H A D | print-zeromq.c | 87 zmtp1_print_frame(netdissect_options *ndo, const u_char *cp, const u_char *ep) in zmtp1_print_frame() argument 94 if (GET_U_1(cp) != 0xFF) { /* length/0xFF */ in zmtp1_print_frame() 96 body_len_declared = GET_U_1(cp); in zmtp1_print_frame() 101 ND_TCHECK_LEN(cp, header_len); /* 0xFF, length */ in zmtp1_print_frame() 102 body_len_declared = GET_BE_U_8(cp + 1); in zmtp1_print_frame() 106 return cp + header_len; /* skip to the next frame */ in zmtp1_print_frame() 107 ND_TCHECK_LEN(cp, header_len + 1); /* ..., flags */ in zmtp1_print_frame() 108 flags = GET_U_1(cp + header_len); in zmtp1_print_frame() 110 body_len_captured = ep - cp - header_len; in zmtp1_print_frame() 123 hex_and_ascii_print(ndo, "\n\t ", cp + header_len + 1, body_len_printed - 1); in zmtp1_print_frame() [all …]
|
| /freebsd/contrib/tcsh/ |
| H A D | vms.termcap.c | 71 char *cp, in tgetent() 97 while (*(cp = &bp[strlen(bp) - 2]) == '\\') in tgetent() 98 fgets(cp, 1024, fp); in tgetent() 101 for (++cp ; ISSPACE(*cp) ; cp++); in tgetent() 150 char *cp; in tgetnum() local 153 if ((cp = capab) == NULL || id == NULL) in tgetnum() 155 while (*++cp != ':') in tgetnum() 157 for (++cp ; *cp ; cp++) { in tgetnum() 158 while (ISSPACE(*cp)) in tgetnum() 159 cp++; in tgetnum() [all …]
|
| H A D | sh.dir.c | 100 Char *cp, *tcp; in dinit() local 111 cp = NULL; in dinit() 113 cp = Strsave(hp); in dinit() 116 cp = NULL; in dinit() 117 if (cp == NULL) { in dinit() 122 cp = SAVE("/"); in dinit() 137 cp = Strsave(hp); in dinit() 152 cp = dcanon(tcp, STRNULL); in dinit() 155 cp = dcanon(tcp, STRNULL); in dinit() 160 dp->di_name = cp; in dinit() [all …]
|
| /freebsd/usr.bin/mail/ |
| H A D | util.c | 159 char *cp, *cp2; in gethfield() local 167 for (cp = linebuf; isprint((unsigned char)*cp) && *cp != ' ' && *cp != ':'; in gethfield() 168 cp++) in gethfield() 170 if (*cp != ':' || cp == linebuf) in gethfield() 176 *colon = cp; in gethfield() 177 cp = linebuf + c; in gethfield() 179 while (--cp >= linebuf && (*cp == ' ' || *cp == '\t')) in gethfield() 181 cp++; in gethfield() 193 if (cp + c >= linebuf + LINESIZE - 2) in gethfield() 195 *cp++ = ' '; in gethfield() [all …]
|
| H A D | head.c | 89 char *cp, *sp; in parse() local 95 cp = line; in parse() 100 cp = nextword(cp, word); in parse() 104 if (isdate(cp)) { in parse() 105 hl->l_date = copyin(cp, &sp); in parse() 108 cp = nextword(cp, word); in parse() 111 if (cp != NULL && strncmp(cp, "tty", 3) == 0) { in parse() 112 cp = nextword(cp, word); in parse() 115 if (cp != NULL) in parse() 116 hl->l_date = copyin(cp, &sp); in parse() [all …]
|
| /freebsd/crypto/openssh/regress/unittests/misc/ |
| H A D | test_strdelim.c | 27 char *orig, *str, *cp; in test_strdelim() local 34 cp = strdelim(&str); in test_strdelim() 35 ASSERT_STRING_EQ(cp, ""); /* XXX arguable */ in test_strdelim() 36 cp = strdelim(&str); in test_strdelim() 37 ASSERT_PTR_EQ(cp, NULL); in test_strdelim() 43 cp = strdelim(&str); in test_strdelim() 44 ASSERT_STRING_EQ(cp, ""); /* XXX better as NULL */ in test_strdelim() 51 cp = strdelim(&str); in test_strdelim() 52 ASSERT_STRING_EQ(cp, "blob"); in test_strdelim() 53 cp = strdelim(&str); in test_strdelim() [all …]
|
| /freebsd/lib/libc/resolv/ |
| H A D | res_mkquery.c | 97 u_char *cp, *ep; in res_nmkquery() local 120 cp = buf + HFIXEDSZ; in res_nmkquery() 132 if (ep - cp < QFIXEDSZ) in res_nmkquery() 134 if ((n = dn_comp(dname, cp, ep - cp - QFIXEDSZ, dnptrs, in res_nmkquery() 137 cp += n; in res_nmkquery() 138 ns_put16(type, cp); in res_nmkquery() 139 cp += INT16SZ; in res_nmkquery() 140 ns_put16(class, cp); in res_nmkquery() 141 cp += INT16SZ; in res_nmkquery() 148 if ((ep - cp) < RRFIXEDSZ) in res_nmkquery() [all …]
|
| H A D | res_debug.c | 192 const u_char *cp = ns_rr_rdata(rr); in do_section() local 195 GETSHORT(optcode, cp); in do_section() 196 GETSHORT(optlen, cp); in do_section() 206 cp[i]); in do_section() 210 isprint(cp[i])? in do_section() 211 cp[i] : '.'); in do_section() 223 cp[i]); in do_section() 227 isprint(cp[i]) ? in do_section() 228 cp[i] : '.'); in do_section() 341 p_cdnname(const u_char *cp, const u_char *msg, int len, FILE *file) { in p_cdnname() argument [all …]
|
| /freebsd/stand/common/ |
| H A D | boot.c | 133 char *cp, *prompt; in command_autoboot() local 142 howlong = strtol(argv[1], &cp, 0); in command_autoboot() 143 if (*cp != 0) { in command_autoboot() 164 char *cp; in autoboot_maybe() local 166 cp = getenv("autoboot_delay"); in autoboot_maybe() 167 if ((autoboot_tried == 0) && ((cp == NULL) || strcasecmp(cp, "NO"))) in autoboot_maybe() 176 char *argv[2], *cp, *ep; in autoboot() local 187 if ((cp = getenv("autoboot_delay"))) { in autoboot() 188 timeout = strtol(cp, &ep, 0); in autoboot() 189 if (cp == ep) in autoboot() [all …]
|
| /freebsd/usr.sbin/bluetooth/hccontrol/ |
| H A D | link_control.c | 48 ng_hci_inquiry_cp cp; in hci_inquiry() local 52 cp.lap[2] = 0x9e; in hci_inquiry() 53 cp.lap[1] = 0x8b; in hci_inquiry() 54 cp.lap[0] = 0x33; in hci_inquiry() 55 cp.inquiry_length = 5; in hci_inquiry() 56 cp.num_responses = 8; in hci_inquiry() 65 cp.num_responses = (n0 & 0xff); in hci_inquiry() 72 cp.inquiry_length = (n0 & 0xff); in hci_inquiry() 79 cp.lap[0] = (n0 & 0xff); in hci_inquiry() 80 cp.lap[1] = (n1 & 0xff); in hci_inquiry() [all …]
|
| /freebsd/lib/libbluetooth/ |
| H A D | bluetooth.c | 65 char **cp; in bt_gethostbyname() local 71 for (cp = p->h_aliases; *cp != NULL; cp++) in bt_gethostbyname() 72 if (strcasecmp(*cp, name) == 0) in bt_gethostbyname() 103 char *p, *cp, **q; in bt_gethostent() local 119 if ((cp = strpbrk(p, "#\n")) == NULL) in bt_gethostent() 121 *cp = 0; in bt_gethostent() 122 if ((cp = strpbrk(p, " \t")) == NULL) in bt_gethostent() 124 *cp++ = 0; in bt_gethostent() 132 while (*cp == ' ' || *cp == '\t') in bt_gethostent() 133 cp++; in bt_gethostent() [all …]
|
| /freebsd/contrib/unifdef/ |
| H A D | unifdef.c | 797 const char *cp; in parseline() local 803 cp = skiphash(); in parseline() 804 if (cp == NULL) in parseline() 812 if (*cp == '\0') { in parseline() 816 keyword = tline + (cp - tline); in parseline() 817 if ((cp = matchsym("ifdef", keyword)) != NULL || in parseline() 818 (cp = matchsym("ifndef", keyword)) != NULL) { in parseline() 819 cp = skipcomment(cp); in parseline() 820 if ((cursym = findsym(&cp)) == NULL) in parseline() 832 } else if ((cp = matchsym("if", keyword)) != NULL) in parseline() [all …]
|
| /freebsd/lib/libutil/ |
| H A D | fparseln.c | 46 const char *cp; in isescaped() local 59 for (ne = 0, cp = p; --cp >= sp && *cp == esc; ne++) in isescaped() 79 char *ptr, *cp; in fparseln() local 113 for (cp = ptr; cp < ptr + s; cp++) in fparseln() 114 if (*cp == com && !isescaped(ptr, cp, esc)) { in fparseln() 115 s = cp - ptr; in fparseln() 122 cp = &ptr[s - 1]; in fparseln() 124 if (*cp == nl) in fparseln() 129 cp = &ptr[s - 1]; in fparseln() 131 if (*cp == con && !isescaped(ptr, cp, esc)) { in fparseln() [all …]
|
| /freebsd/usr.sbin/rtadvd/ |
| H A D | control_server.c | 92 int (*dt_act)(struct ctrl_msg_pl *cp); 109 cm_getprop_echo(struct ctrl_msg_pl *cp) in cm_getprop_echo() argument 113 cp->cp_val = strdup(""); in cm_getprop_echo() 114 cp->cp_val_len = strlen(cp->cp_val) + 1; in cm_getprop_echo() 120 cm_getprop_version(struct ctrl_msg_pl *cp) in cm_getprop_version() argument 124 cp->cp_val = strdup(CM_VERSION_STR); in cm_getprop_version() 125 cp->cp_val_len = strlen(cp->cp_val) + 1; in cm_getprop_version() 131 cm_getprop_ifilist(struct ctrl_msg_pl *cp) in cm_getprop_ifilist() argument 150 cp->cp_val = p; in cm_getprop_ifilist() 159 cp->cp_val_len = p - cp->cp_val; in cm_getprop_ifilist() [all …]
|
| /freebsd/sys/geom/ |
| H A D | geom_subr.c | 187 struct g_consumer *cp; in g_unload_class() local 201 LIST_FOREACH(cp, &gp->consumer, consumer) in g_unload_class() 202 if (cp->acr || cp->acw || cp->ace) { in g_unload_class() 309 struct g_consumer *cp; in g_retaste_event() local 331 LIST_FOREACH(cp, &pp->consumers, consumers) { in g_retaste_event() 332 if (cp->geom->class == mp && in g_retaste_event() 333 (cp->flags & G_CF_ORPHAN) == 0) in g_retaste_event() 336 if (cp != NULL) { in g_retaste_event() 337 cp->flags |= G_CF_ORPHAN; in g_retaste_event() 338 g_wither_geom(cp->geom, ENXIO); in g_retaste_event() [all …]
|
| /freebsd/usr.bin/ctags/ |
| H A D | lisp.c | 48 char *cp; in l_entries() local 74 for (cp = lbp; *cp && *cp != '\n'; ++cp) in l_entries() 76 *cp = EOS; in l_entries() 78 if (!(cp = strchr(lbp, ')'))) in l_entries() 80 for (; cp >= lbp && *cp != ':'; --cp) in l_entries() [all...] |
| /freebsd/contrib/blocklist/port/ |
| H A D | fparseln.c | 63 const char *cp; in isescaped() local 71 for (ne = 0, cp = p; --cp >= sp && *cp == esc; ne++) in isescaped() 91 char *ptr, *cp; in fparseln() local 123 for (cp = ptr; cp < ptr + s; cp++) in fparseln() 124 if (*cp == com && !isescaped(ptr, cp, esc)) { in fparseln() 125 s = cp - ptr; in fparseln() 132 cp = &ptr[s - 1]; in fparseln() 134 if (*cp == nl) in fparseln() 139 cp = &ptr[s - 1]; in fparseln() 141 if (*cp == con && !isescaped(ptr, cp, esc)) { in fparseln() [all …]
|
| /freebsd/contrib/tcp_wrappers/ |
| H A D | vfprintf.c | 27 register char *cp; in vfprintf() local 35 for (cp = format; *cp; cp++) { in vfprintf() 36 if (*cp != '%') { in vfprintf() 37 putc(*cp, fp); /* ordinary character */ in vfprintf() 54 *fmtp++ = *cp++; in vfprintf() 55 if (*cp == '-') /* left-adjusted field? */ in vfprintf() 56 *fmtp++ = *cp++; in vfprintf() 57 if (*cp == '0') /* zero-padded field? */ in vfprintf() 58 *fmtp++ = *cp++; in vfprintf() 59 if (*cp == '*') { /* dynamic field witdh */ in vfprintf() [all …]
|
| /freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/ |
| H A D | callb.h | 133 #define CALLB_CPR_INIT(cp, lockp, func, name) { \ argument 136 memset(cp, 0, sizeof (callb_cpr_t)); \ 137 (cp)->cc_lockp = lockp; \ 138 (cp)->cc_id = callb_add(func, (void *)(cp), \ 140 cv_init(&(cp)->cc_callb_cv, NULL, CV_DEFAULT, NULL); \ 141 cv_init(&(cp)->cc_stop_cv, NULL, CV_DEFAULT, NULL); \ 145 #define CALLB_CPR_ASSERT(cp) ASSERT(MUTEX_HELD((cp)->cc_lockp)); argument 147 #define CALLB_CPR_ASSERT(cp) argument 171 #define CALLB_CPR_SAFE_BEGIN(cp) { \ argument 172 CALLB_CPR_ASSERT(cp) \ [all …]
|
| /freebsd/sys/cddl/contrib/opensolaris/uts/common/sys/ |
| H A D | callb.h | 133 #define CALLB_CPR_INIT(cp, lockp, func, name) { \ argument 136 bzero((caddr_t)(cp), sizeof (callb_cpr_t)); \ 137 (cp)->cc_lockp = lockp; \ 138 (cp)->cc_id = callb_add(func, (void *)(cp), \ 140 cv_init(&(cp)->cc_callb_cv, NULL, CV_DEFAULT, NULL); \ 141 cv_init(&(cp)->cc_stop_cv, NULL, CV_DEFAULT, NULL); \ 145 #define CALLB_CPR_ASSERT(cp) ASSERT(MUTEX_HELD((cp)->cc_lockp)); argument 147 #define CALLB_CPR_ASSERT(cp) argument 171 #define CALLB_CPR_SAFE_BEGIN(cp) { \ argument 172 CALLB_CPR_ASSERT(cp) \ [all …]
|