/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 …]
|
/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 | 29 char *orig, *str, *cp; in test_strdelim() local 36 cp = strdelim(&str); in test_strdelim() 37 ASSERT_STRING_EQ(cp, ""); /* XXX arguable */ in test_strdelim() 38 cp = strdelim(&str); in test_strdelim() 39 ASSERT_PTR_EQ(cp, NULL); in test_strdelim() 45 cp = strdelim(&str); in test_strdelim() 46 ASSERT_STRING_EQ(cp, ""); /* XXX better as NULL */ in test_strdelim() 53 cp = strdelim(&str); in test_strdelim() 54 ASSERT_STRING_EQ(cp, "blob"); in test_strdelim() 55 cp = strdelim(&str); in test_strdelim() [all …]
|
/freebsd/lib/libc/resolv/ |
H A D | res_mkquery.c | 102 u_char *cp, *ep; in res_nmkquery() local 125 cp = buf + HFIXEDSZ; in res_nmkquery() 137 if (ep - cp < QFIXEDSZ) in res_nmkquery() 139 if ((n = dn_comp(dname, cp, ep - cp - QFIXEDSZ, dnptrs, in res_nmkquery() 142 cp += n; in res_nmkquery() 143 ns_put16(type, cp); in res_nmkquery() 144 cp += INT16SZ; in res_nmkquery() 145 ns_put16(class, cp); in res_nmkquery() 146 cp += INT16SZ; in res_nmkquery() 153 if ((ep - cp) < RRFIXEDSZ) in res_nmkquery() [all …]
|
H A D | res_init.c | 169 char *cp, **pp; in __res_vinit() local 256 char buf[sizeof(statp->defdname)], *cp; in __res_vinit() local 263 cp = strchr(buf, '.'); in __res_vinit() 264 cp = (cp == NULL) ? buf : (cp + 1); in __res_vinit() 265 strncpy(statp->defdname, cp, in __res_vinit() 273 if ((cp = secure_getenv("LOCALDOMAIN")) != NULL) { in __res_vinit() 274 (void)strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1); in __res_vinit() 285 cp = statp->defdname; in __res_vinit() 287 *pp++ = cp; in __res_vinit() 288 for (n = 0; *cp && pp < statp->dnsrch + MAXDNSRCH; cp++) { in __res_vinit() [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/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/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/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/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/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 | 91 int (*dt_act)(struct ctrl_msg_pl *cp); 107 cm_getprop_echo(struct ctrl_msg_pl *cp) in cm_getprop_echo() argument 111 cp->cp_val = strdup(""); in cm_getprop_echo() 112 cp->cp_val_len = strlen(cp->cp_val) + 1; in cm_getprop_echo() 118 cm_getprop_version(struct ctrl_msg_pl *cp) in cm_getprop_version() argument 122 cp->cp_val = strdup(CM_VERSION_STR); in cm_getprop_version() 123 cp->cp_val_len = strlen(cp->cp_val) + 1; in cm_getprop_version() 129 cm_getprop_ifilist(struct ctrl_msg_pl *cp) in cm_getprop_ifilist() argument 163 cm_getprop_ifi(struct ctrl_msg_pl * cp) cm_getprop_ifi() argument 198 cm_getprop_rai(struct ctrl_msg_pl * cp) cm_getprop_rai() argument 239 cm_getprop_ifi_ra_timer(struct ctrl_msg_pl * cp) cm_getprop_ifi_ra_timer() argument 285 cm_getprop_rti(struct ctrl_msg_pl * cp) cm_getprop_rti() argument 334 cm_getprop_pfx(struct ctrl_msg_pl * cp) cm_getprop_pfx() argument 383 cm_getprop_rdnss(struct ctrl_msg_pl * cp) cm_getprop_rdnss() argument 452 cm_getprop_dnssl(struct ctrl_msg_pl * cp) cm_getprop_dnssl() argument 520 cm_getprop(struct ctrl_msg_pl * cp) cm_getprop() argument 539 cm_setprop(struct ctrl_msg_pl * cp) cm_setprop() argument 563 cm_setprop_reload(struct ctrl_msg_pl * cp) cm_setprop_reload() argument 575 cm_setprop_enable(struct ctrl_msg_pl * cp) cm_setprop_enable() argument 599 cm_setprop_disable(struct ctrl_msg_pl * cp) cm_setprop_disable() argument 635 struct ctrl_msg_pl cp; cm_handler_server() local [all...] |
/freebsd/contrib/blocklist/port/ |
H A D | fparseln.c | 61 const char *cp; in isescaped() local 69 for (ne = 0, cp = p; --cp >= sp && *cp == esc; ne++) in isescaped() 89 char *ptr, *cp; in fparseln() local 121 for (cp = ptr; cp < ptr + s; cp++) in fparseln() 122 if (*cp == com && !isescaped(ptr, cp, esc)) { in fparseln() 123 s = cp - ptr; in fparseln() 130 cp = &ptr[s - 1]; in fparseln() 132 if (*cp == nl) in fparseln() 137 cp = &ptr[s - 1]; in fparseln() 139 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/geom/ |
H A D | geom_subr.c | 185 struct g_consumer *cp; in g_unload_class() local 199 LIST_FOREACH(cp, &gp->consumer, consumer) in g_unload_class() 200 if (cp->acr || cp->acw || cp->ace) { in g_unload_class() 307 struct g_consumer *cp; in g_retaste_event() local 329 LIST_FOREACH(cp, &pp->consumers, consumers) { in g_retaste_event() 330 if (cp->geom->class == mp && in g_retaste_event() 331 (cp->flags & G_CF_ORPHAN) == 0) in g_retaste_event() 334 if (cp != NULL) { in g_retaste_event() 335 cp->flags |= G_CF_ORPHAN; in g_retaste_event() 336 g_wither_geom(cp->geom, ENXIO); in g_retaste_event() [all …]
|
/freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/ |
H A D | callb.h | 132 #define CALLB_CPR_INIT(cp, lockp, func, name) { \ argument 135 memset(cp, 0, sizeof (callb_cpr_t)); \ 136 (cp)->cc_lockp = lockp; \ 137 (cp)->cc_id = callb_add(func, (void *)(cp), \ 139 cv_init(&(cp)->cc_callb_cv, NULL, CV_DEFAULT, NULL); \ 140 cv_init(&(cp)->cc_stop_cv, NULL, CV_DEFAULT, NULL); \ 144 #define CALLB_CPR_ASSERT(cp) ASSERT(MUTEX_HELD((cp)->cc_lockp)); argument 146 #define CALLB_CPR_ASSERT(cp) argument 170 #define CALLB_CPR_SAFE_BEGIN(cp) { \ argument 171 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 …]
|
/freebsd/sys/contrib/openzfs/module/lua/ |
H A D | lcompat.c | 25 const char *cp; in lcompat_strtoll() local 30 cp = str; in lcompat_strtoll() 31 while (*cp == ' ' || *cp == '\t' || *cp == '\n') { in lcompat_strtoll() 32 cp++; in lcompat_strtoll() 34 is_negative = (*cp == '-'); in lcompat_strtoll() 36 cp++; in lcompat_strtoll() 40 if (*cp == '0') { in lcompat_strtoll() 42 cp++; in lcompat_strtoll() 43 if (*cp == 'x' || *cp == 'X') { in lcompat_strtoll() 45 cp++; in lcompat_strtoll() [all …]
|