📄 wsagent.h
字号:
/* $Header: /usr/cvsroot/target/src/wrn/wm/demo/winagent/wsagent.h,v 1.1.1.1 2001/11/05 17:49:19 tneale Exp $ *//* * Copyright (C) 1999-2005 Wind River Systems, Inc. * All rights reserved. Provided under license only. * Distribution or other use of this software is only * permitted pursuant to the terms of a license agreement * from Wind River Systems (and is otherwise prohibited). * Refer to that license agreement for terms of use. *//**************************************************************************** * Copyright 1988-1997 Epilogue Technology Corporation. * Copyright 1998 Integrated Systems, Inc. * All rights reserved. ****************************************************************************//* * $Log: wsagent.h,v $ * Revision 1.1.1.1 2001/11/05 17:49:19 tneale * Tornado shuffle * * Revision 1.8 2001/01/19 22:25:12 paul * Update copyright. * * Revision 1.7 2000/03/17 00:15:54 meister * Update copyright message * * Revision 1.6 1998/02/25 04:58:36 sra * Update copyrights. * * Revision 1.5 1997/03/20 06:53:40 sra * DFARS-safe copyright text. Zap! * * Revision 1.4 1997/02/25 16:35:23 mrf * Added RCS log and copyright notice * *//* [clearcase]modification history-------------------01a,19apr05,job update copyright notices*//*--------------------------------------------------------- WSAGENT.H -- Main include file for Winsock SNMP Agent. ---------------------------------------------------------*/ #ifndef _WSAGENT_H_#define _WSAGENT_H_#define DEBUG 0 /* 0 = normal, 1 = debug, 2 = super debug *//*--------------------------------------------------------- System include files. ---------------------------------------------------------*/#include <windows.h>#include <winsock.h>#include <stdarg.h>/*--------------------------------------------------------- Constant definitions ---------------------------------------------------------*/#define FAILURE 0 /* generic return codes */#define SUCCESS 1 #define DESIRED_WINSOCK_VERSION 0x0101 /* want 1.1, will take 1.0 */#define MINIMUM_WINSOCK_VERSION 0x0001#define WM_SOCKET_SELECT (WM_USER + 100) /* sockets api msgs */#define WM_SOCKET_ASYNC (WM_USER + 101)#define MAX_PRINTF_OUTPUT 1024#define MSG_LEN 128#define SNMP_PORT 161#define tmAveCharWidth 4 /* should really be */#define tmHeight 8 /* determined from TEXTMETRIC *//*--------------------------------------------------------- Type definitions ---------------------------------------------------------*/typedef int SOCKERR;typedef WORD PORT;typedef WORD SOCKEVENT;typedef unsigned long ULONG;/*--------------------------------------------------------- Function prototypes ---------------------------------------------------------*/int WS_Initialize (HWND hwnd);void WS_Close();void WS_Receive(SOCKET sock, SOCKERR serr, SOCKEVENT sevent);int MsgBox (HWND hwndParent, UINT fuType, LPSTR pszFormat, ...);void WinPrintf (HDC hdc, int row, int col, LPSTR pszFormat, ...);LPSTR SockerrToString (SOCKERR serr);SOCKERR CreateSocket (SOCKET FAR *psock, int type, ULONG address, WORD port);SOCKERR ResetSocket (SOCKET sock);/*--------------------------------------------------------- Extern declarations ---------------------------------------------------------*/extern LPSTR szAppName;extern SOCKET sSNMP; #endif // _WSAGENT_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -