Lines Matching defs:cliptr

245  * Assign a client-id to cliptr, or output cliptr's value as a client-id.
250 clcid(cli_ent_t *cliptr, char *valstr, boolean_t out)
257 len = cliptr->varlen * 2 + 1;
258 (void) octet_to_hexascii(cliptr->varptr, cliptr->varlen,
264 vmax = cliptr->varmax - 1; /* space for the prefix */
294 (char *)(cliptr->varptr), &vmax) != 0) {
297 cliptr->varlen = vmax;
302 bcopy(valstr, cliptr->varptr, len);
303 cliptr->varlen = len;
311 * Assign a key to cliptr, or output cliptr's value as a key.
318 clkey(cli_ent_t *cliptr, char *valstr, boolean_t out)
325 if (!CLF_ISHIDDEN(cliptr)) {
326 len = cliptr->varlen * 2 + 1;
327 (void) octet_to_hexascii(cliptr->varptr,
328 cliptr->varlen, buffer, &len);
336 vmax = cliptr->varmax;
338 cliptr->varptr, &vmax) != 0) {
341 cliptr->varlen = vmax;
342 CLF_CLRHIDDEN(cliptr);
348 * Assign an IP address to cliptr, or output cliptr's value as an
354 clip(cli_ent_t *cliptr, char *valstr, boolean_t out)
359 printf("%s", (char *)cliptr->varptr);
364 (len = strlen(valstr)) >= cliptr->varmax) {
368 (void) strcpy(cliptr->varptr, valstr);
369 cliptr->varlen = len + 1;
374 * Assign an arbitrary string to cliptr, or output cliptr's value as a string.
377 clstr(cli_ent_t *cliptr, char *valstr, boolean_t out)
382 printf("%s", (char *)cliptr->varptr);
385 if ((len = strlen(valstr)) >= cliptr->varmax) {
388 (void) strcpy(cliptr->varptr, valstr);
389 cliptr->varlen = len + 1;
396 * Assign a URL to cliptr (having verified the format), or output cliptr's
401 clurl(cli_ent_t *cliptr, char *valstr, boolean_t out)
407 printf("%s", (char *)cliptr->varptr);
413 (len = strlen(valstr)) >= cliptr->varmax) {
417 (void) strcpy(cliptr->varptr, valstr);
418 cliptr->varlen = len + 1;
423 * Assign a hostport to cliptr (having verified the format), or output cliptr's
427 clhp(cli_ent_t *cliptr, char *valstr, boolean_t out)
433 printf("%s", (char *)cliptr->varptr);
440 (len = strlen(valstr)) >= cliptr->varmax) {
444 (void) strcpy(cliptr->varptr, valstr);
445 cliptr->varlen = len + 1;
454 clgo(cli_ent_t *cliptr, char *valstr, boolean_t out)
464 clexit(cli_ent_t *cliptr, char *valstr, boolean_t out)
476 clhelp(cli_ent_t *cliptr, char *valstr, boolean_t out)
494 cllist(cli_ent_t *cliptr, char *valstr, boolean_t out)
501 for (cliptr = cli_list; cliptr < &cli_list[num_cli_ent]; cliptr++) {
502 if ((cliptr->flags & (CLF_CMD | CLF_ARG)) != 0 ||
503 (cliptr->flags & wanted) == 0) {
506 printf("%s: ", cliptr->varname);
511 for (i = VAR_MAXWIDTH + 1 - strlen(cliptr->varname);
516 if (CLF_ISSET(cliptr) || CLF_ISHIDDEN(cliptr)) {
517 (void) cliptr->action(cliptr, NULL, B_TRUE);
532 clprompt(cli_ent_t *cliptr, char *valstr, boolean_t out)
547 for (cliptr = cli_list; cliptr < &cli_list[num_cli_ent]; ++cliptr) {
548 if ((cliptr->flags & wanted) == 0) {
552 printf("%s", cliptr->varname);
553 if (CLF_ISSET(cliptr)) {
555 (void) cliptr->action(cliptr, NULL, B_TRUE);
579 switch (cliptr->action(cliptr, valstr, B_FALSE)) {
581 CLF_MODVAL(cliptr);
602 cldhcp(cli_ent_t *cliptr, char *valstr, boolean_t out)
611 cliptr = find_cli_ent(BI_CLIENT_ID);
612 if (CLF_ISMOD(cliptr)) {
613 dhcp_set_client_id(cliptr->varptr, cliptr->varlen);
640 cltest(cli_ent_t *cliptr, char *valstr, boolean_t out)
660 * Return the cliptr corresponding to the named variable.
665 cli_ent_t *cliptr;
667 for (cliptr = cli_list; cliptr < &cli_list[num_cli_ent]; ++cliptr) {
668 if (strcmp(varstr, cliptr->varname) == 0) {
669 return (cliptr);
685 cli_ent_t *cliptr;
736 if ((cliptr = find_cli_ent(varstr)) == NULL) {
746 if ((cliptr->flags & (CLF_CMD | CLF_ARG)) == CLF_ARG &&
763 if ((cliptr->flags & (CLF_CMD | CLF_ARG)) != 0) {
768 if ((cliptr->flags & wanted) == 0) {
774 cliptr->varlen = 0;
775 CLF_MODVAL(cliptr);
779 (cliptr->flags & (CLF_CMD | CLF_ARG)) == 0) {
789 if ((cliptr->flags & CLF_CMD) != 0) {
797 switch (cliptr->action(cliptr, valstr, !assign)) {
799 CLF_MODVAL(cliptr);
803 cliptr->varname);
837 cli_ent_t *cliptr;
849 cliptr = find_cli_ent(BI_AES_KEY);
850 bcopy(encr_key, cliptr->varptr, AES_128_KEY_SIZE);
851 cliptr->varlen = AES_128_KEY_SIZE;
852 CLF_MODVAL(cliptr);
861 cliptr = find_cli_ent(BI_3DES_KEY);
862 bcopy(encr_key, cliptr->varptr, DES3_KEY_SIZE);
863 cliptr->varlen = DES3_KEY_SIZE;
864 CLF_MODVAL(cliptr);
874 cli_ent_t *cliptr;
886 cliptr = find_cli_ent(BI_SHA1_KEY);
887 bcopy(hash_key, cliptr->varptr, WANBOOT_HMAC_KEY_SIZE);
888 cliptr->varlen = WANBOOT_HMAC_KEY_SIZE;
889 CLF_MODVAL(cliptr);
901 cli_ent_t *cliptr;
903 for (cliptr = cli_list; cliptr < &cli_list[num_cli_ent]; ++cliptr) {
904 if ((cliptr->flags & which) != 0 && !CLF_ISSET(cliptr)) {
905 size_t len = cliptr->varmax;
907 if (bootinfo_get(cliptr->varname, cliptr->varptr,
909 cliptr->varlen = len;
910 CLF_SETVAL(cliptr);
923 cli_ent_t *cliptr;
925 for (cliptr = cli_list; cliptr < &cli_list[num_cli_ent]; ++cliptr) {
926 if ((cliptr->flags & which) != 0 && CLF_ISMOD(cliptr)) {
927 (void) bootinfo_put(cliptr->varname,
928 cliptr->varptr, cliptr->varlen, 0);