#ifndef __PPP_OPTIONS__
#define __PPP_OPTIONS__
#define DIR_KEXT "/System/Library/Extensions/"
#define DIR_LOGS "/var/log/ppp/"
#define DIR_TTYS "/dev/"
#define PATH_PPPD "/usr/sbin/pppd"
#define PPPD_PRGM "pppd"
#define OPT_DEV_NAME_DEF "modem"
#define OPT_DEV_NAME_PPPoE_DEF "en0"
#define OPT_DEV_SPEED_DEF 0 // use the default tty speed, CCL will set the speed
#define OPT_DEV_CONNECTSCRIPT_DEF "Apple Internal 56K Modem (v.34)"
#define OPT_DEV_SPEAKER_DEF 1
#define OPT_DEV_DIALMODE_DEF 0 // Normal mode
#define OPT_DEV_PULSE_DEF 0
#define OPT_COMM_IDLETIMER_DEF 0 // no idle timer
#define OPT_COMM_SESSIONTIMER_DEF 0 // no session timer
#define OPT_COMM_CONNECTDELAY_DEF 0 // delay to wait after link is connected (in seconds)
#define OPT_COMM_REMINDERTIMER_DEF 0 // no reminder timer
#define OPT_COMM_TERMINALMODE_DEF PPP_COMM_TERM_NONE
#define OPT_LCP_ACCOMP_DEF 1 // address and control fields compression activated
#define OPT_LCP_PCOMP_DEF 1 // protocol field compression activated
#define OPT_LCP_RCACCM_DEF PPP_LCP_ACCM_NONE // default asyncmap value
#define OPT_LCP_TXACCM_DEF PPP_LCP_ACCM_NONE // default asyncmap value
#define OPT_LCP_MRU_DEF 1500
#define OPT_LCP_MRU_PPPoE_DEF 1492
#define OPT_LCP_MRU_PPTP_DEF 1500
#define OPT_LCP_MRU_L2TP_DEF 1500
#define OPT_LCP_MTU_DEF 1500
#define OPT_LCP_MTU_PPPoE_DEF 1492
#define OPT_LCP_MTU_PPTP_DEF 1448
#define OPT_LCP_MTU_L2TP_DEF 1280
#define OPT_LCP_ECHOINTERVAL_DEF 10
#define OPT_LCP_ECHOFAILURE_DEF 4
#define OPT_IPCP_HDRCOMP_DEF PPP_IPCP_HDRCOMP_VJ // tcp vj compression activated
#define OPT_IPCP_USESERVERDNS_DEF 1 // acquire DNS from server
#define OPT_HOSTNAME_DEF "localhost"
#define OPT_ALERT_DEF PPP_ALERT_ENABLEALL
#define OPT_AUTH_PROTO_DEF PPP_AUTH_PAPCHAP // do any auth proposed by server
#define OPT_VERBOSELOG_DEF 0 // quiet log by default
#define OPT_LOGFILE_DEF "" // no logs by default (suggested name "ppp.log")
#define OPT_AUTOCONNECT_DEF 0 // dial on demand not activated
#define OPT_DISCLOGOUT_DEF 1 // disconnect on logout by default
#define EXIT_PPPSERIAL_NOCARRIER 1
#define EXIT_PPPSERIAL_NONUMBER 2
#define EXIT_PPPSERIAL_BUSY 3
#define EXIT_PPPSERIAL_NODIALTONE 4
#define EXIT_PPPSERIAL_ERROR 5
#define EXIT_PPPSERIAL_NOANSWER 6
#define EXIT_PPPSERIAL_HANGUP 7
#define EXIT_PPPSERIAL_BADSCRIPT 8
#define OPT_STR_LEN 256
u_long ppp_setoption (struct client *client, struct msg *req, void **reply);
u_long ppp_getoption (struct client *client, struct msg *req, void **reply);
u_long set_long_opt (CFMutableDictionaryRef opts, CFStringRef entity, CFStringRef property,
u_long opt, u_long mini, u_long maxi, u_long limit);
u_long set_str_opt (CFMutableDictionaryRef opts, CFStringRef entity, CFStringRef property,
char *opt, int len, CFStringRef optref);
u_long set_array_opt (CFMutableDictionaryRef opts, CFStringRef entity, CFStringRef property,
CFStringRef optref1, CFStringRef optref2);
void remove_opt (CFMutableDictionaryRef opts, CFStringRef entity, CFStringRef property);
int ppp_getoptval(struct ppp *ppp, CFDictionaryRef opts, CFDictionaryRef setup,
u_int32_t otype, void *pdata, u_int32_t *plen);
u_long get_addr_option (struct ppp *ppp, CFStringRef entity, CFStringRef property,
CFDictionaryRef optsdict, CFDictionaryRef setupdict, u_int32_t *opt, u_int32_t defaultval);
u_long get_int_option (struct ppp *ppp, CFStringRef entity, CFStringRef property,
CFDictionaryRef optsdict, CFDictionaryRef setupdict, u_int32_t *opt, u_int32_t defaultval);
int get_str_option (struct ppp *ppp, CFStringRef entity, CFStringRef property,
CFDictionaryRef optsdict, CFDictionaryRef setupdict, u_char *opt, u_int32_t *outlen, u_char *defaultval);
CFTypeRef get_cf_option (CFStringRef entity, CFStringRef property, CFTypeID type,
CFDictionaryRef options, CFDictionaryRef setup, CFTypeRef defaultval);
int options_init_all();
int getStringFromEntity(CFStringRef domain, CFStringRef serviceID,
CFStringRef entity, CFStringRef property, u_char *str, u_int16_t maxlen);
CFStringRef copyCFStringFromEntity(CFStringRef domain, CFStringRef serviceID,
CFStringRef entity, CFStringRef property);
int getNumberFromEntity(CFStringRef domain, CFStringRef serviceID,
CFStringRef entity, CFStringRef property, u_int32_t *outval);
int getAddressFromEntity(CFStringRef domain, CFStringRef serviceID,
CFStringRef entity, CFStringRef property, u_int32_t *outval);
int getNumber(CFDictionaryRef service, CFStringRef property, u_int32_t *outval);
int getString(CFDictionaryRef service, CFStringRef property, u_char *str, u_int16_t maxlen);
CFDictionaryRef copyService(CFStringRef domain, CFStringRef serviceID);
CFDictionaryRef copyEntity(CFStringRef domain, CFStringRef serviceID, CFStringRef entity);
int existEntity(CFStringRef domain, CFStringRef serviceID, CFStringRef entity);
u_int32_t CFStringAddrToLong(CFStringRef string);
extern CFStringRef gLoggedInUser;
#endif