Lines Matching refs:type

137 findencryption(int type)  in findencryption()  argument
141 if (!(I_SUPPORT_ENCRYPT & remote_supports_decrypt & typemask(type))) in findencryption()
143 for (; (ep->type != 0) && (ep->type != type); ep++); in findencryption()
144 return (ep->type ? ep : NULL); in findencryption()
148 finddecryption(int type) in finddecryption() argument
152 if (!(I_SUPPORT_DECRYPT & remote_supports_encrypt & typemask(type))) in finddecryption()
154 while (ep->type && ep->type != type) in finddecryption()
156 return (ep->type ? ep : NULL); in finddecryption()
192 while (ep->type) { in encrypt_init()
196 Name, ENCTYPE_NAME(ep->type)); in encrypt_init()
197 i_support_encrypt |= typemask(ep->type); in encrypt_init()
198 i_support_decrypt |= typemask(ep->type); in encrypt_init()
199 if ((i_wont_support_decrypt & typemask(ep->type)) == 0) in encrypt_init()
200 if ((str_send[str_suplen++] = ep->type) == IAC) in encrypt_init()
216 while (ep->type) { in encrypt_list_types()
218 ENCTYPE_NAME(ep->type), ep->type); in encrypt_list_types()
224 EncryptEnable(char *type, char *mode) in EncryptEnable() argument
226 if (isprefix(type, "help") || isprefix(type, "?")) { in EncryptEnable()
233 if (EncryptType(type, mode)) in EncryptEnable()
240 EncryptDisable(char *type, char *mode) in EncryptDisable() argument
245 if (isprefix(type, "help") || isprefix(type, "?")) { in EncryptDisable()
249 } else if ((ep = (Encryptions *)genget(type, (char **)encryptions, in EncryptDisable()
251 (void) printf(gettext("%s: invalid encryption type\n"), type); in EncryptDisable()
253 (void) printf(gettext("Ambiguous type '%s'\n"), type); in EncryptDisable()
256 if (decrypt_mode == ep->type) in EncryptDisable()
258 i_wont_support_decrypt |= typemask(ep->type); in EncryptDisable()
262 if (encrypt_mode == ep->type) in EncryptDisable()
264 i_wont_support_encrypt |= typemask(ep->type); in EncryptDisable()
275 EncryptType(char *type, char *mode) in EncryptType() argument
280 if (isprefix(type, "help") || isprefix(type, "?")) { in EncryptType()
284 } else if ((ep = (Encryptions *)genget(type, (char **)encryptions, in EncryptType()
286 (void) printf(gettext("%s: invalid encryption type\n"), type); in EncryptType()
288 (void) printf(gettext("Ambiguous type '%s'\n"), type); in EncryptType()
291 decrypt_mode = ep->type; in EncryptType()
292 i_wont_support_decrypt &= ~typemask(ep->type); in EncryptType()
296 encrypt_mode = ep->type; in EncryptType()
297 i_wont_support_encrypt &= ~typemask(ep->type); in EncryptType()
495 register int type, use_type = 0; in encrypt_support() local
504 type = *typelist++; in encrypt_support()
508 Name, ENCTYPE_NAME(type), type); in encrypt_support()
509 if ((type < TELOPT_ENCTYPE_CNT) && in encrypt_support()
510 (I_SUPPORT_ENCRYPT & typemask(type))) { in encrypt_support()
511 remote_supports_decrypt |= typemask(type); in encrypt_support()
513 use_type = type; in encrypt_support()
520 type = ep->start ? (*ep->start)(TELNET_DIR_ENCRYPT) : 0; in encrypt_support()
524 Name, type); in encrypt_support()
525 if (type < 0) in encrypt_support()
528 if (type == 0) in encrypt_support()
537 register int type, ret; in encrypt_is() local
541 type = *data++; in encrypt_is()
542 if (type < TELOPT_ENCTYPE_CNT) in encrypt_is()
543 remote_supports_encrypt |= typemask(type); in encrypt_is()
544 if (!(ep = finddecryption(type))) { in encrypt_is()
549 ENCTYPE_NAME_OK(type) ? in encrypt_is()
550 ENCTYPE_NAME(type) : UNKNOWN, type); in encrypt_is()
558 ENCTYPE_NAME_OK(type) ? in encrypt_is()
559 ENCTYPE_NAME(type) : UNKNOWN, type); in encrypt_is()
572 decrypt_mode = type; in encrypt_is()
582 register int ret, type; in encrypt_reply() local
586 type = *data++; in encrypt_reply()
587 if (!(ep = findencryption(type))) { in encrypt_reply()
592 ENCTYPE_NAME_OK(type) ? in encrypt_reply()
593 ENCTYPE_NAME(type) : UNKNOWN, type); in encrypt_reply()
601 ENCTYPE_NAME_OK(type) ? in encrypt_reply()
602 ENCTYPE_NAME(type) : UNKNOWN, type); in encrypt_reply()
618 encrypt_mode = type; in encrypt_reply()
620 encrypt_start_output(type); in encrypt_reply()
671 while (ep->type) { in encrypt_session_key()
676 encrypt_start_output(ep->type); in encrypt_session_key()
816 encrypt_start_output(int type) in encrypt_start_output() argument
822 if (!(ep = findencryption(type))) { in encrypt_start_output()
826 Name, ENCTYPE_NAME_OK(type) ? in encrypt_start_output()
827 ENCTYPE_NAME(type) : UNKNOWN, type); in encrypt_start_output()
839 i, ENCTYPE_NAME(type)); in encrypt_start_output()
862 encrypt_mode = type; in encrypt_start_output()
866 Name, ENCTYPE_NAME(type)); in encrypt_start_output()
870 ENCTYPE_NAME(type)); in encrypt_start_output()
960 register int type = data[1]; in encrypt_printsub() local
962 for (ep = encryptions; ep->type && ep->type != type; ep++) in encrypt_printsub()