X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fchap-new.h;h=9ebec54f82f4991458c16da8342500ed3b9df51d;hb=607d8eadccfd62c1fa84a36bd1440bd48b4e55ca;hp=48235d405af786852efb4d26fcc275c4cf572498;hpb=7977da267649fee17261d0d163a12863f3534b57;p=ppp.git diff --git a/pppd/chap-new.h b/pppd/chap-new.h index 48235d4..9ebec54 100644 --- a/pppd/chap-new.h +++ b/pppd/chap-new.h @@ -28,6 +28,11 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifndef PPP_CHAP_NEW_H +#define PPP_CHAP_NEW_H + +#include "pppdconf.h" + /* * CHAP packets begin with a standard header with code, id, len (2 bytes). */ @@ -105,7 +110,7 @@ struct chap_digest_type { void (*make_response)(unsigned char *response, int id, char *our_name, unsigned char *challenge, char *secret, int secret_len, unsigned char *priv); - int (*check_success)(unsigned char *pkt, int len, unsigned char *priv); + int (*check_success)(int id, unsigned char *pkt, int len); void (*handle_failure)(unsigned char *pkt, int len); struct chap_digest_type *next; @@ -120,6 +125,9 @@ extern int (*chap_verify_hook)(char *name, char *ourname, int id, /* Called by digest code to register a digest type */ extern void chap_register_digest(struct chap_digest_type *); +/* Lookup a digest handler by type */ +extern struct chap_digest_type *chap_find_digest(int digest_code); + /* Called by authentication code to start authenticating the peer. */ extern void chap_auth_peer(int unit, char *our_name, int digest_code); @@ -128,3 +136,5 @@ extern void chap_auth_with_peer(int unit, char *our_name, int digest_code); /* Represents the CHAP protocol to the main pppd code */ extern struct protent chap_protent; + +#endif