X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/3aa4eda8b1e0c4abc04439affe850d33648c7472..d95367dce9d4d2303b7da1624b28034457611a61:/constants.h?ds=sidebyside diff --git a/constants.h b/constants.h index 3ac8983..a9693c3 100644 --- a/constants.h +++ b/constants.h @@ -1,27 +1,17 @@ - -// enum these ? - -#define MAX_LCP_TYPE 8 -extern const char *lcp_types[MAX_LCP_TYPE+1]; - -#define MAX_AVPNAME 40 -extern const char *avpnames[MAX_AVPNAME+1]; - -#define MAX_STOPCCN_RESULT_CODE 7 -extern const char *stopccn_result_codes[MAX_STOPCCN_RESULT_CODE+1]; - -#define MAX_CDN_RESULT_CODE 11 -extern const char *cdn_result_codes[MAX_CDN_RESULT_CODE+1]; - -#define MAX_ERROR_CODE 8 -extern const char *error_codes[MAX_ERROR_CODE+1]; - -#define MAX_AUTHTYPE 5 -extern const char *authtypes[MAX_AUTHTYPE+1]; - -// Can remove the NULL end now -#define MAX_RADIUS_STATE 8 -extern const char *radius_states[MAX_RADIUS_STATE+1]; - -#define MAX_L2TP_MESSAGE_TYPE 16 -extern const char *l2tp_message_types[MAX_L2TP_MESSAGE_TYPE+1]; +#ifndef __CONSTANTS_H__ +#define __CONSTANTS_H__ + +char const *l2tp_code(int type); +char const *l2tp_avp_name(int avp); +char const *l2tp_stopccn_result_code(int code); +char const *l2tp_cdn_result_code(int code); +char const *l2tp_error_code(int code); +char const *ppp_phase(int code); +char const *ppp_state(int code); +char const *ppp_auth_type(int type); +char const *ppp_code(int type); +char const *ppp_lcp_option(int type); +char const *radius_state(int state); +char const *radius_code(int code); + +#endif /* __CONSTANTS_H__ */