⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 snap_svc_conversion.h

📁 一个学习SNMP项目:tmoerlan.
💻 H
字号:
/*	snap service handler	type conversion header file	(c) 2003 Willem de Bruijn    some code has been copied from the base SNAP package by Jon Moore	all other code falls under the BSD License*/#ifndef SNAP_SVC_CONV_H#define SNAP_SVC_CONV_H#include <snap_svc.h>#include "packet.h"#include "io.h"    /* a heap tuple */	struct snap_htup {	    unsigned short int n;	    struct snap_hval **vals;	};    /* a heap value */	struct snap_hval {    	unsigned short int typetag;	    union {			unsigned int scalar;			buffer_t *s;			struct snap_htup *t;	    } v;	};	/* 		conversion functions 	*/	/* pop from the stack and create a returnstruct */	void* snap_svc_convert_stack2returnstruct(packet_t*, value_t*);		/* convert a returnstruct to a stackitem and push it onto the stack */	int snap_svc_convert_returnstruct2stack(packet_t*, value_t*, struct svc_returnitem*);	/* convert function return values to stackvalues and push 'em onto the stack */	/*	    WARNING : this function is somewhat insecure. It takes		a type (see the enum in snap_svc.h) that is either a		string (void*, char*, etc) or a single value.	*/	int snap_svc_convert_direct2stack(packet_t *, void*, int);	/* create arguments from (popped) stackvalues */	void** snap_svc_convert_stack2arguments(packet_t*, int);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -