资源简介
用C++写的防火墙源码,功能齐全,仅用于于学习交流用

代码片段和文件信息
/*****************************************************************************
* Created by Lawrence Rust Software Systems Consultants
*
* File name : sws_cfg.c
* Function : configuration data access
* Project : Various
* Authors : Lawrence Rust
* Systems : ANSI C
*
*****************************************************************************
* File History
* ------------
*
* 29-Jan-03 LVR Created.
* 14-Sep-03 LVR v1.00 - Moved SWS_CFG_MAX_KEY to sws_cfg.h
* 19-Nov-04 LVR v1.03 - Added SWS_CfgSetString
* 30-Nov-04 LVR v1.04 - Added SWS_CfgSetValue
* 05-Dec-04 LVR v1.04 - Made SWS_CfgEnum re-entrant
* 04-Mar-05 LVR v1.04 - Add GetIniFile
* 12-May-05 LVR v1.04 - Add isCreate param to GetIniFile
*
*
* Comments
* --------
*
*****************************************************************************/
#if defined _MSC_VER
#pragma warning ( disable : 4711) /* function selected for automatic inline expansion */
#endif
#if SWS_CFG_SET && defined __GNUC__
#undef __STRICT_ANSI__ /* for fileno in stdio.h */
#undef _POSIX_SOURCE /* for tell & chsize in io.h */
#endif
/* Exports */
#include “sws_cfg.h“
/* Imports */
/* ANSI C library */
#include
#include
#include
#include
#include
#if SWS_CFG_SET && (defined _MSC_VER || defined __GNUC__ )
#include /* tell & chsize */
#endif
/***************************************************************************
* Macros & constants
***************************************************************************/
/* Expand and stringize a macro name */
#define STRING_(s) #s
#define STRING(s) STRING_(s)
#define ALPHANUM “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789“\
“!\“#$%&‘()*+-./:;<>?@\\^_‘{|}~“
#define kszModeRO “r“ /* File open mode */
#if SWS_CFG_SET
#define kszModeRW “r+“ /* File open mode */
#define kszModeWR “w+“ /* File open mode */
#endif
/***************************************************************************
* Data types
***************************************************************************/
/* EnumIniStringCallback context info */
typedef struct SGetIniString
{
const char* pszVal;
char* pszBuf;
size_t len;
} SGetIniString;
/* SetStringCallback context info */
typedef struct SSetIniString
{
const char* pszKey;
const char* pszName;
const char* pszVal;
char* buffer;
size_t len;
int isKey ins;
} SSetIniString;
/***************************************************************************
* Function prototypes
***************************************************************************/
static FILE* GetIniFile( SWS_PTR( const char) int);
static SWS_FCfgCallback EnumIniStringCallback;
#if SWS_CFG_SET
static SWS_FCfgCallback SetStringCallback;
#endif
static int Stricmp( SWS_PTR( const char) SWS_PTR( const char) );
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2005-10-03 20:43 Common\
文件 3132 2005-10-03 20:43 Common\NetCenturionIni.h
文件 14806 2005-06-19 15:34 Common\sws_cfg.c
文件 3722 2005-06-13 11:41 Common\sws_cfg.h
文件 3795 2005-05-24 17:34 Common\sws_host.h
文件 1091 2003-06-01 18:00 icon.gif
目录 0 2005-10-16 17:45 IpFilterService\
目录 0 2005-06-27 13:45 IpFilterService\cygwin\
文件 14100 2003-05-19 13:45 IpFilterService\cygwin\fltdefs.h
文件 29708 2000-02-02 23:11 IpFilterService\cygwin\IPHlpApi.Lib
文件 837 2003-05-19 13:19 IpFilterService\cygwin\MAKECYGW.BAT
文件 3742 2005-06-27 13:35 IpFilterService\cygwin\makefile
文件 2002 2005-06-21 10:20 IpFilterService\deque.c
文件 1963 2005-05-24 17:35 IpFilterService\deque.h
文件 38845 2005-10-03 21:37 IpFilterService\IpFilter.c
文件 1435 2003-09-13 20:15 IpFilterService\ipfilter.h
文件 16026 2005-09-08 15:50 IpFilterService\mainsvc.c
文件 4933 2005-10-03 21:02 IpFilterService\NetCenturion.dsp
文件 547 2003-04-19 19:58 IpFilterService\NetCenturion.dsw
文件 2621 2005-10-05 12:04 IpFilterService\NetCenturion.rc
文件 416 2003-04-24 12:28 IpFilterService\resource.h
文件 3380 2005-06-25 21:03 netcenturion-LAN.ini
文件 7060 2005-06-26 11:06 netcenturion.inf
文件 1314 2005-06-25 18:54 netcenturion.ini
文件 3629 2005-10-05 12:03 readme.txt
目录 0 2003-05-31 18:35 Setup\
文件 454 1999-03-25 22:57 Setup\RESOURCE.H
文件 4780 2003-05-31 19:21 Setup\SETUP.CPP
文件 4008 2003-05-26 20:24 Setup\SETUP.DSP
文件 533 2003-05-26 20:06 Setup\SETUP.DSW
文件 1078 1999-03-25 22:53 Setup\SETUP.ICO
............此处省略29个文件信息
- 上一篇:c++学籍管理系统代码
- 下一篇:C语言解码JPG图片源代码
相关资源
- 国际象棋的qt源代码
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- c++ 多功能计算器
- C++17 In Detail
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
- c++ 邮件多附件群发
- c++ 透明代理(hookproxy)
- mfc 调用redis
- FTP客户端源码(c++)
- c++ 画图(14Qt-XPS)
- c++多边形交并差运算
评论
共有 条评论