version 1.1, 2012/02/21 23:32:47
|
version 1.1.1.2, 2021/03/17 00:39:23
|
Line 66
|
Line 66
|
static Mbuf MppcRecvResetReq(Bund b, int id, Mbuf bp, int *noAck); |
static Mbuf MppcRecvResetReq(Bund b, int id, Mbuf bp, int *noAck); |
static char *MppcDescribeBits(u_int32_t bits, char *buf, size_t len); |
static char *MppcDescribeBits(u_int32_t bits, char *buf, size_t len); |
static int MppcNegotiated(Bund b, int xmit); |
static int MppcNegotiated(Bund b, int xmit); |
static int MppcSetCommand(Context ctx, int ac, char *av[], void *arg); | static int MppcSetCommand(Context ctx, int ac, const char *const av[], const void *arg); |
|
|
/* Encryption stuff */ |
/* Encryption stuff */ |
static void MppeInitKey(Bund b, MppcInfo mppc, int dir); |
static void MppeInitKey(Bund b, MppcInfo mppc, int dir); |
Line 130
|
Line 130
|
MppcSetCommand, NULL, 2, (void *) SET_YES }, |
MppcSetCommand, NULL, 2, (void *) SET_YES }, |
{ "no [opt ...]", "Disable and deny option", |
{ "no [opt ...]", "Disable and deny option", |
MppcSetCommand, NULL, 2, (void *) SET_NO }, |
MppcSetCommand, NULL, 2, (void *) SET_NO }, |
{ NULL }, | { NULL, NULL, NULL, NULL, 0, NULL }, |
}; |
}; |
|
|
int MPPCPresent = 0; |
int MPPCPresent = 0; |
Line 197 MppcInit(Bund b, int dir)
|
Line 197 MppcInit(Bund b, int dir)
|
|
|
strlcat(path, ppphook, sizeof(path)); |
strlcat(path, ppphook, sizeof(path)); |
|
|
id = NgGetNodeID(-1, path); | if ((id = NgGetNodeID(-1, path)) == 0) { |
| Perror("[%s] Cannot get %s node id", b->name, NG_MPPC_NODE_TYPE); |
| goto fail; |
| } |
| |
if (dir == COMP_DIR_XMIT) { |
if (dir == COMP_DIR_XMIT) { |
b->ccp.comp_node_id = id; |
b->ccp.comp_node_id = id; |
} else { |
} else { |
Line 210 MppcInit(Bund b, int dir)
|
Line 214 MppcInit(Bund b, int dir)
|
NGM_MPPC_COOKIE, cmd, &conf, sizeof(conf)) < 0) { |
NGM_MPPC_COOKIE, cmd, &conf, sizeof(conf)) < 0) { |
Perror("[%s] can't config %s node at %s", |
Perror("[%s] can't config %s node at %s", |
b->name, NG_MPPC_NODE_TYPE, path); |
b->name, NG_MPPC_NODE_TYPE, path); |
NgFuncShutdownNode(gCcpCsock, b->name, path); | goto fail; |
return(-1); | |
} |
} |
|
|
/* Done */ |
/* Done */ |
return(0); |
return(0); |
|
|
|
fail: |
|
NgFuncShutdownNode(gCcpCsock, b->name, path); |
|
return(-1); |
} |
} |
|
|
static int |
static int |
Line 489 static Mbuf
|
Line 496 static Mbuf
|
MppcRecvResetReq(Bund b, int id, Mbuf bp, int *noAck) |
MppcRecvResetReq(Bund b, int id, Mbuf bp, int *noAck) |
{ |
{ |
char path[NG_PATHSIZ]; |
char path[NG_PATHSIZ]; |
|
|
|
(void)id; |
|
(void)bp; |
|
|
/* Forward ResetReq to the MPPC compression node */ |
/* Forward ResetReq to the MPPC compression node */ |
snprintf(path, sizeof(path), "[%x]:", b->ccp.comp_node_id); |
snprintf(path, sizeof(path), "[%x]:", b->ccp.comp_node_id); |
if (NgSendMsg(gCcpCsock, path, |
if (NgSendMsg(gCcpCsock, path, |
Line 803 done:
|
Line 814 done:
|
*/ |
*/ |
|
|
int |
int |
MppcStat(Context ctx, int ac, char *av[], void *arg) | MppcStat(Context ctx, int ac, const char *const av[], const void *arg) |
{ |
{ |
MppcInfo const mppc = &ctx->bund->ccp.mppc; |
MppcInfo const mppc = &ctx->bund->ccp.mppc; |
|
|
|
(void)ac; |
|
(void)av; |
|
(void)arg; |
|
|
Printf("MPPC options:\r\n"); |
Printf("MPPC options:\r\n"); |
OptStat(ctx, &mppc->options, gConfList); |
OptStat(ctx, &mppc->options, gConfList); |
|
|
Line 818 MppcStat(Context ctx, int ac, char *av[], void *arg)
|
Line 833 MppcStat(Context ctx, int ac, char *av[], void *arg)
|
*/ |
*/ |
|
|
static int |
static int |
MppcSetCommand(Context ctx, int ac, char *av[], void *arg) | MppcSetCommand(Context ctx, int ac, const char *const av[], const void *arg) |
{ |
{ |
MppcInfo const mppc = &ctx->bund->ccp.mppc; |
MppcInfo const mppc = &ctx->bund->ccp.mppc; |
|
|