not understanding how to make use of ppp_msg.h, PPPLib.c and PPPLib.h
not understanding how to make use of ppp_msg.h, PPPLib.c and PPPLib.h
- Subject: not understanding how to make use of ppp_msg.h, PPPLib.c and PPPLib.h
- From: Ben Dougall <email@hidden>
- Date: Sat, 18 Jun 2005 12:15:37 +0100
this works (makes the modem connect):
#include "ppplib.h"
int ref;
PPPInit(&ref);
PPPConnect(ref, link);
but i can't work out how to use this function:
int PPPStatus (int ref, u_int32_t link, struct ppp_status **stat);
the ppp_status struct is declared like this in ppp_msg.h:
struct ppp_status {
// connection stats
u_int32_t status;
union {
struct connected {
u_int32_t timeElapsed;
u_int32_t timeRemaining;
// bytes stats
u_int32_t inBytes;
u_int32_t inPackets;
u_int32_t inErrors;
u_int32_t outBytes;
u_int32_t outPackets;
u_int32_t outErrors;
} run;
struct disconnected {
u_int32_t lastDiscCause;
} disc;
struct waitonbusy {
u_int32_t timeRemaining;
} busy;
} s;
};
what variables should be set up and how, and then how should the
PPPStatus call be (to get any info)? can anyone give an example of how
to call PPPStatus please?
i'm on os x 10.2.8 and got ppp_msg.h, PPPLib.c, PPPLib.h from the
corresponding to os x 10.2.8 darwin vesion's ppp module.
also does anyone know how or where these are used (they're from
ppp_msg.h)?:
/* codes for options management */
enum {
PPP_OPT_DEV_NAME = 1, // string
PPP_OPT_DEV_SPEED, // 4 bytes
PPP_OPT_DEV_CONNECTSCRIPT, // string
PPP_OPT_COMM_IDLETIMER, // 4 bytes
PPP_OPT_COMM_REMOTEADDR, // string
PPP_OPT_AUTH_PROTO, // 4 bytes
PPP_OPT_AUTH_NAME, // string
....
one of those is "PPP_OPT_DEV_CONNECTSPEED, // 4 bytes, actual
connection speed". i'd really like to be able to get the connection
speed. anyone know how to get that info?
thanks in advance for any help,
ben.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden