X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fchap-new.c;h=ad2f5eb975de779f2b8f707c73fe77d40153aeb0;hb=ab1b84327c5ecddf485734baa49b0b846f756c05;hp=fab82800a7b33950935c8b13a1be41a0982b45dd;hpb=7f7ea8967e3b02234811a4b9bb893fc21544319c;p=ppp.git diff --git a/pppd/chap-new.c b/pppd/chap-new.c index fab8280..ad2f5eb 100644 --- a/pppd/chap-new.c +++ b/pppd/chap-new.c @@ -166,6 +166,18 @@ chap_register_digest(struct chap_digest_type *dp) chap_digests = dp; } +/* + * Lookup a digest type by code + */ +struct chap_digest_type * +chap_find_digest(int digest_code) { + struct chap_digest_type *dp = NULL; + for (dp = chap_digests; dp != NULL; dp = dp->next) + if (dp->code == digest_code) + break; + return dp; +} + /* * chap_lowerup - we can start doing stuff now. */