Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Achou.Wang
accel-ppp
提交
0fe6eb8b
A
accel-ppp
项目概览
Achou.Wang
/
accel-ppp
通知
6
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
accel-ppp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0fe6eb8b
编写于
6月 04, 2018
作者:
V
Vladislav Grishenko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sstp: snmp: add missed files, fix
0d454ad7
上级
a7d64124
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
104 addition
and
0 deletion
+104
-0
accel-pppd/extra/net-snmp/statSSTP.c
accel-pppd/extra/net-snmp/statSSTP.c
+93
-0
accel-pppd/extra/net-snmp/statSSTP.h
accel-pppd/extra/net-snmp/statSSTP.h
+11
-0
未找到文件。
accel-pppd/extra/net-snmp/statSSTP.c
0 → 100644
浏览文件 @
0fe6eb8b
/*
* Note: this file originally auto-generated by mib2c using
* : mib2c.int_watch.conf 13957 2005-12-20 15:33:08Z tanders $
*/
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "triton.h"
#include "statSSTP.h"
/*
* The variables we want to tie the relevant OIDs to.
* The agent will handle all GET and (if applicable) SET requests
* to these variables automatically, changing the values as needed.
*/
void
sstp_get_stat
(
unsigned
int
**
,
unsigned
int
**
);
static
unsigned
int
*
stat_starting
;
static
unsigned
int
*
stat_active
;
/*
* Our initialization routine, called automatically by the agent
* (Note that the function name must match init_FILENAME())
*/
void
init_statSSTP
(
void
)
{
netsnmp_handler_registration
*
reg
;
netsnmp_watcher_info
*
winfo
;
static
oid
statSSTPStarting_oid
[]
=
{
1
,
3
,
6
,
1
,
4
,
1
,
8072
,
100
,
1
,
7
,
1
};
static
oid
statSSTPActive_oid
[]
=
{
1
,
3
,
6
,
1
,
4
,
1
,
8072
,
100
,
1
,
7
,
2
};
/*
* a debugging statement. Run the agent with -DstatSSTP to see
* the output of this debugging statement.
*/
DEBUGMSGTL
((
"statSSTP"
,
"Initializing the statSSTP module
\n
"
));
if
(
!
triton_module_loaded
(
"sstp"
))
return
;
sstp_get_stat
(
&
stat_starting
,
&
stat_active
);
/*
* Register scalar watchers for each of the MIB objects.
* The ASN type and RO/RW status are taken from the MIB definition,
* but can be adjusted if needed.
*
* In most circumstances, the scalar watcher will handle all
* of the necessary processing. But the NULL parameter in the
* netsnmp_create_handler_registration() call can be used to
* supply a user-provided handler if necessary.
*
* This approach can also be used to handle Counter64, string-
* and OID-based watched scalars (although variable-sized writeable
* objects will need some more specialised initialisation).
*/
DEBUGMSGTL
((
"statSSTP"
,
"Initializing statSSTPStarting scalar integer. Default value = %d
\n
"
,
0
));
reg
=
netsnmp_create_handler_registration
(
"statSSTPStarting"
,
NULL
,
statSSTPStarting_oid
,
OID_LENGTH
(
statSSTPStarting_oid
),
HANDLER_CAN_RONLY
);
winfo
=
netsnmp_create_watcher_info
(
stat_starting
,
sizeof
(
*
stat_starting
),
ASN_INTEGER
,
WATCHER_FIXED_SIZE
);
if
(
netsnmp_register_watched_scalar
(
reg
,
winfo
)
<
0
)
{
snmp_log
(
LOG_ERR
,
"Failed to register watched statSSTPStarting"
);
}
DEBUGMSGTL
((
"statSSTP"
,
"Initializing statSSTPActive scalar integer. Default value = %d
\n
"
,
0
));
reg
=
netsnmp_create_handler_registration
(
"statSSTPActive"
,
NULL
,
statSSTPActive_oid
,
OID_LENGTH
(
statSSTPActive_oid
),
HANDLER_CAN_RONLY
);
winfo
=
netsnmp_create_watcher_info
(
stat_active
,
sizeof
(
*
stat_active
),
ASN_INTEGER
,
WATCHER_FIXED_SIZE
);
if
(
netsnmp_register_watched_scalar
(
reg
,
winfo
)
<
0
)
{
snmp_log
(
LOG_ERR
,
"Failed to register watched statSSTPActive"
);
}
DEBUGMSGTL
((
"statSSTP"
,
"Done initalizing statSSTP module
\n
"
));
}
accel-pppd/extra/net-snmp/statSSTP.h
0 → 100644
浏览文件 @
0fe6eb8b
/*
* Note: this file originally auto-generated by mib2c using
* : mib2c.int_watch.conf 13957 2005-12-20 15:33:08Z tanders $
*/
#ifndef STATSSTP_H
#define STATSSTP_H
/* function declarations */
void
init_statSSTP
(
void
);
#endif
/* STATSSTP_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录