📄 pmrpc_sif.c
字号:
/************************************************************************
* Copyright (C) 2004 Combrio Networks Co. *
* This unpublished source code is the property of Nexware Corporation.*
* All rights reserved. Use, duplication, or disclosure are restricted *
* and subject to the authorization from Combrio Networks Corporation. *
************************************************************************/
/************************************************************************
* File name: pmrpc_sif.c *
* *
* Description: Fulfill the functions of pmrpc application interface *
* *
************************************************************************/
#include <string.h>
#include <stdio.h>
#include "include/ctypes.h"
#include "include/rpc/rpc.h"
#include "pmrpc.h"
#include "pmrpc_srp.h"
static int retcode;
int *drop_tcpack_2(tcpdrop_args *tcp_drop,struct svc_req *s)
{
retcode = drop_tcpack(tcp_drop);
return(&retcode);
}
int *load_config_2()
{
return(&retcode);
}
int *set_crc_2(int *mode, struct svc_req *s)
{
retcode = set_crc(*mode);
return(&retcode);
}
int *set_scramble_2(int *mode, struct svc_req *s)
{
retcode = set_scramble(*mode);
return(&retcode);
}
int *set_maxlen_2(unsigned int *len, struct svc_req *s)
{
retcode = set_maxlen(*len);
return(&retcode);
}
int *set_minlen_2(unsigned int *len, struct svc_req *s)
{
retcode = set_minlen(*len);
return(&retcode);
}
config_struct *save_config_2(void *v,struct svc_req *s)
{
config_struct *retcode1;
retcode1 = show_config();
return(retcode1);
}
rule_struct *save_rule_2(void *v,struct svc_req *s)
{
rule_struct *retcode2;
retcode2 = show_rule(0);
return(retcode2);
}
int *load_rule_2(rule_struct *index_filter,struct svc_req *s)
{
retcode =configure_rule(index_filter);
return(&retcode);
}
int *clear_rule_2(unsigned int *index, struct svc_req *s)
{
retcode = clear_rule(*index);
return(&retcode);
}
rule_struct *show_rule_2(unsigned int *index,struct svc_req *s)
{
rule_struct *retcode2;
retcode2 = show_rule(*index);
return(retcode2);
}
int *config_rule_2(rule_struct *index_filter,struct svc_req *s)
{
retcode = configure_rule(index_filter);
return(&retcode);
}
int *set_def_rule_2(defrule_args *mode, struct svc_req *s)
{
retcode = set_def_rule(mode);
return(&retcode);
}
config_struct* show_config_2(void *v,struct svc_req *s)
{
config_struct *retcode1;
retcode1 = show_config();
return(retcode1);
}
int *set_mactable_2(int *mode,struct svc_req *s)
{
retcode = set_mactable(*mode);
return(&retcode);
}
/*rule_array_struct *save_batch_rule_2(void *v,struct svc_req *s)
{
rule_array_struct *retcode2;
retcode2 = save_batch_rule();
return(retcode2);
}
rule_array_struct *show_batch_rule_2(unsigned int *index,struct svc_req *s)
{
rule_array_struct *retcode2;
retcode2 = show_batch_rule();
return(retcode2);
}*/
int *config_batch_rule_2(rule_array_struct *index_filter,struct svc_req *s)
{
retcode = config_batch_rule(index_filter);
return(&retcode);
}
int *load_batch_rule_2(rule_array_struct *index_filter,struct svc_req *s)
{
retcode =load_batch_rule(index_filter);
return(&retcode);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -