snap_svc_conversion.h

来自「一个学习SNMP项目:tmoerlan.」· C头文件 代码 · 共 55 行

H
55
字号
/*	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 + =
减小字号Ctrl + -
显示快捷键?