version 1.1.1.1, 2013/07/22 08:44:29
|
version 1.1.1.2, 2021/03/17 00:39:23
|
Line 101 DeflateInit(Bund b, int dir)
|
Line 101 DeflateInit(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_DEFLATE_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 114 DeflateInit(Bund b, int dir)
|
Line 118 DeflateInit(Bund b, int dir)
|
NGM_DEFLATE_COOKIE, NGM_DEFLATE_CONFIG, &conf, sizeof(conf)) < 0) { |
NGM_DEFLATE_COOKIE, NGM_DEFLATE_CONFIG, &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_DEFLATE_NODE_TYPE, path); |
b->name, NG_DEFLATE_NODE_TYPE, path); |
NgFuncShutdownNode(gCcpCsock, b->name, path); | goto fail; |
return(-1); | |
} |
} |
|
|
return 0; |
return 0; |
|
|
|
fail: |
|
NgFuncShutdownNode(gCcpCsock, b->name, path); |
|
return(-1); |
} |
} |
|
|
/* |
/* |
Line 189 static Mbuf
|
Line 196 static Mbuf
|
DeflateRecvResetReq(Bund b, int id, Mbuf bp, int *noAck) |
DeflateRecvResetReq(Bund b, int id, Mbuf bp, int *noAck) |
{ |
{ |
char path[NG_PATHSIZ]; |
char path[NG_PATHSIZ]; |
|
|
|
(void)bp; |
|
(void)id; |
|
(void)noAck; |
|
|
/* Forward ResetReq to the DEFLATE compression node */ |
/* Forward ResetReq to the DEFLATE 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 205 DeflateRecvResetReq(Bund b, int id, Mbuf bp, int *noAc
|
Line 217 DeflateRecvResetReq(Bund b, int id, Mbuf bp, int *noAc
|
static Mbuf |
static Mbuf |
DeflateSendResetReq(Bund b) |
DeflateSendResetReq(Bund b) |
{ |
{ |
|
(void)b; |
return(NULL); |
return(NULL); |
} |
} |
|
|
Line 216 static void
|
Line 229 static void
|
DeflateRecvResetAck(Bund b, int id, Mbuf bp) |
DeflateRecvResetAck(Bund b, int id, Mbuf bp) |
{ |
{ |
char path[NG_PATHSIZ]; |
char path[NG_PATHSIZ]; |
|
|
|
(void)bp; |
|
(void)id; |
|
|
/* Forward ResetReq to the DEFLATE compression node */ |
/* Forward ResetReq to the DEFLATE compression node */ |
snprintf(path, sizeof(path), "[%x]:", b->ccp.decomp_node_id); |
snprintf(path, sizeof(path), "[%x]:", b->ccp.decomp_node_id); |
if (NgSendMsg(gCcpCsock, path, |
if (NgSendMsg(gCcpCsock, path, |
Line 305 DeflateDecodeConfigReq(Fsm fp, FsmOption opt, int mode
|
Line 322 DeflateDecodeConfigReq(Fsm fp, FsmOption opt, int mode
|
static int |
static int |
DeflateNegotiated(Bund b, int dir) |
DeflateNegotiated(Bund b, int dir) |
{ |
{ |
|
(void)b; |
|
(void)dir; |
|
|
return 1; |
return 1; |
} |
} |
|
|
Line 315 DeflateNegotiated(Bund b, int dir)
|
Line 335 DeflateNegotiated(Bund b, int dir)
|
static int |
static int |
DeflateSubtractBloat(Bund b, int size) |
DeflateSubtractBloat(Bund b, int size) |
{ |
{ |
|
(void)b; |
|
(void)size; |
|
|
return(size + CCP_OVERHEAD); /* Compression compensate header size */ |
return(size + CCP_OVERHEAD); /* Compression compensate header size */ |
} |
} |
|
|