瀏覽代碼

Imported Upstream version 0.7.5

Evvolve Media SRL 23 年之前
父節點
當前提交
293b619470
共有 19 個文件被更改,包括 555 次插入21 次删除
  1. 50 0
      Makefile.nmake
  2. 41 0
      README.win32
  3. 4 0
      docsis.h
  4. 1 0
      docsis_common.h
  5. 4 4
      docsis_decode.c
  6. 8 1
      docsis_encode.c
  7. 40 0
      docsis_main.c
  8. 5 0
      docsis_snmp.c
  9. 1 0
      docsis_symtable.h
  10. 37 15
      examples/docsis20.cfg
  11. 80 0
      examples/docsis20_no_snmp.cfg
  12. 4 0
      inet_aton.c
  13. 4 0
      inet_aton.h
  14. 8 0
      libyywrap.c
  15. 1 1
      version.h
  16. 2 0
      win32/testdec.bat
  17. 2 0
      win32/testenc.bat
  18. 234 0
      win32/win32.dsp
  19. 29 0
      win32/win32.dsw

+ 50 - 0
Makefile.nmake

@@ -0,0 +1,50 @@
+# Makefile for VC++ 6.0
+
+CC 	=  cl /W3
+#DEFS	= /D YY_NO_UNPUT  /D DEBUG  /D WIN32
+DEFS	= /D YY_NO_UNPUT  /D WIN32
+#
+# We assume ucd-snmp is installed in \usr. If not, replace with 
+# actual package location
+# 
+CFLAGS	= /I "\usr\include"
+LIBS  	= \usr\lib\libsnmp.lib wsock32.lib
+
+docsis: Makefile docsis_decode.obj docsis_yy.obj docsis_main.obj md5.obj hmac_md5.obj docsis_snmp.obj ethermac.h ethermac.obj version.h docsis_encode.obj inet_aton.obj libyywrap.obj
+	$(CC) $(CFLAGS) $(DEFS) /Fedocsis docsis_main.obj docsis_encode.obj docsis_decode.obj docsis_yy.obj md5.obj hmac_md5.obj docsis_snmp.obj ethermac.obj inet_aton.obj libyywrap.obj $(LIBS)
+
+# docsis_main (add)
+docsis_main.obj: docsis_main.c
+	$(CC) $(CFLAGS) $(DEFS) /c docsis_main.c
+
+docsis_yy.obj: docsis_yy.c
+	$(CC) $(CFLAGS) $(DEFS) /c docsis_yy.c
+docsis_yy.c: docsis_lex.l docsis_yy.tab.c docsis_symtable.h
+	flex -odocsis_yy.c docsis_lex.l
+docsis_yy.tab.c: docsis_yy.y docsis.h docsis_common.h docsis_encode.h
+	bison -t -v docsis_yy.y
+md5.obj: md5.c md5.h
+	$(CC) $(CFLAGS) $(DEFS) /c md5.c
+hmac_md5.obj: md5.h hmac_md5.c
+	$(CC) $(CFLAGS) $(DEFS) /c hmac_md5.c
+docsis_snmp.obj: docsis.h docsis_snmp.c
+	$(CC) $(CFLAGS) $(DEFS) /c docsis_snmp.c
+docsis_decode.obj: docsis_common.h docsis_decode.h docsis.h docsis_decode.c
+	$(CC) $(CFLAGS) $(DEFS) /c docsis_decode.c
+docsis_encode.obj: docsis_common.h docsis_encode.h docsis_encode.c
+	$(CC) $(CFLAGS) $(DEFS) /c docsis_encode.c
+docsis_main.obj: docsis_common.h docsis_encode.h docsis_decode.h docsis.h docsis_symtable.h docsis_globals.h ethermac.h version.h docsis_main.c
+	$(CC) $(CFLAGS) $(DEFS) /c docsis_main.c
+ethermac.obj: ethermac.h ethermac.c
+	$(CC) $(CFLAGS) $(DEFS) /c ethermac.c
+
+# inet_aton (add)
+inet_aton.obj: inet_aton.c
+	$(CC) $(CFLAGS) $(DEFS) /c inet_aton.c
+
+# libyywrap (add)
+libyywrap.obj: libyywrap.c
+	$(CC) $(CFLAGS) $(DEFS) /c libyywrap.c
+
+clean: 
+	rm -f docsis_yy.output docsis_yy.tab.c docsis_yy.c docsis *.obj

+ 41 - 0
README.win32

@@ -0,0 +1,41 @@
+This guide describes building with Microsoft Visual C++.
+
+
+Building with MS VC++
+---------------------
+
+The win32 directory contains a Microsoft VC++ (6.0) workspace and
+project files to build the application. Building with earlier
+compiler versions has not been attempted.
+
+To build the applications, open the workspace file
+"win32\win32.dsw" from VC++.
+
+Note there is a Debug version and Release version for each
+subproject. The Debug product .exe file have "_d" appended
+to the basename of the application.
+
+You can also build the application on console window with
+Makefile.nmake:
+nmake -f Makefile.nmake
+
+
+Requirement
+-----------
+
+NET-SNMP library files are required to build this application.
+These are assumed to be installed to "\usr" directory, that is,
+all include files are in "\usr\include\ucd-snmp" and library files
+are in "\usr\lib". The libsnmp.dll is also needed.
+You can download NET-SNMP from http://sourceforge.net/projects/net-snmp
+
+Cygwin bison/flex are also required to build the application.
+
+
+Test the application
+--------------------
+You can test the application with testenc.bat and testdec.bat,
+which encodes/decodes the configuration files.
+
+
+Nobuhiko Someya <jboy@nifty.com>

+ 4 - 0
docsis.h

@@ -29,9 +29,13 @@
 #include <string.h>
 #include <math.h>
 #include <sys/types.h>
+#ifdef WIN32
+#include <winsock.h>
+#else
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#endif
 
 #include <ucd-snmp/ucd-snmp-config.h>
 #include <ucd-snmp/ucd-snmp-includes.h>

+ 1 - 0
docsis_common.h

@@ -1,3 +1,4 @@
+
 /* 
  *  DOCSIS configuration file encoder. 
  *  Copyright (c) 2001 Cornel Ciocirlan, ctrl@users.sourceforge.net.

+ 4 - 4
docsis_decode.c

@@ -162,10 +162,11 @@ void decode_aggregate (unsigned char *tlvbuf, symbol_type *sym)
   register unsigned char *cp;
   symbol_type *current_symbol;
   
-  cp = tlvbuf+2*sizeof(unsigned char); /* skip type,len of parent TLV */
+  cp = tlvbuf+2; /* skip type,len of parent TLV */
   printf( "%s {\n", sym->sym_ident);
 
-  while ( (unsigned int) (cp - tlvbuf)  < (unsigned int) tlvbuf[1] ) {
+/*  while ( (unsigned int) (cp - tlvbuf +(sizeof(unsigned char))) < (unsigned int) tlvbuf[1] ) { */
+  while ( (unsigned int) (cp - tlvbuf) < (unsigned int) tlvbuf[1] ) {
   current_symbol = find_symbol_by_code_and_pid (cp[0], sym->id);
   if (current_symbol == NULL) { 
 		decode_unknown(cp, NULL);	
@@ -183,8 +184,7 @@ void decode_aggregate (unsigned char *tlvbuf, symbol_type *sym)
  * DOCSIS use. 
  * It's also a bif different from docsis_aggregate in that docsis_aggregate 
  * takes an aggregate tlvbuf as argument that INCLUDES the "parent" code and 
- * length. On the main aggregate we don't have a "parent" code / length, the 
- * first code/length is the first configuration setting.
+ * length. On the main aggregate we don't have a code / length. 
  */
 
 void decode_main_aggregate (unsigned char *tlvbuf, unsigned int buflen)

+ 8 - 1
docsis_encode.c

@@ -27,10 +27,17 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifdef WIN32
+#include <io.h>
+#include <winsock.h>
+#include "inet_aton.h"
+#else
 #include <unistd.h>
-#include <fcntl.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#endif
+
+#include <fcntl.h>
 #include <math.h>
 
 

+ 40 - 0
docsis_main.c

@@ -28,7 +28,12 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifdef WIN32
+#include <io.h>
+#include "inet_aton.h"
+#else
 #include <unistd.h>
+#endif
 #include <fcntl.h>
 
 
@@ -121,6 +126,25 @@ int main(int argc,char *argv[] )
 	unsigned int buflen=0,keylen=0;
 	int i;
 
+#ifdef WIN32
+	int	nReturnCode;
+	WSADATA	wsaData;
+	WORD wVersionRequired = MAKEWORD(1, 1);
+	// WinSock DLL initialization
+	nReturnCode = WSAStartup(wVersionRequired, &wsaData);
+	if (nReturnCode != 0) {
+		printf("error: WinSock initialization failure\n");
+		exit(1);
+	}
+	// WinSock version check
+	if (wsaData.wVersion != wVersionRequired) {
+		printf("error: WinSock version unavailable\n");
+		WSACleanup();
+		exit(1);
+	}
+	init_mib();
+#endif
+
 	init_snmp("snmpapp");
 	init_global_symtable();
 
@@ -166,11 +190,19 @@ int main(int argc,char *argv[] )
 		exit (-100); /* we don't overwrite the source file */
 	}
 
+#ifdef WIN32
+	if ( (cf = fopen ( argv[2],"rb" ))== NULL ) { 
+#else
 	if ( (cf = fopen ( argv[2],"r" ))== NULL ) { 
+#endif
 		printf ("%s: Can't open config file %s\n",argv[0],argv[1]);
 		exit(-5);
 	}
+#ifdef WIN32
+	if ( (kf = fopen ( argv[3],"rb" ))== NULL ) { 
+#else
 	if ( (kf = fopen ( argv[3],"r" ))== NULL ) { 
+#endif
 		printf ("%s: Can't open keyfile %s\n",argv[0],argv[2]);
 		exit(-5);
 	}
@@ -206,7 +238,11 @@ int main(int argc,char *argv[] )
 	buflen = add_eod_and_pad ( buffer, buflen );
 	printf ("Final buffer content:\n");
 	decode_main_aggregate ( buffer, buflen );
+#ifdef WIN32
+	if ( (of = fopen ( argv[4],"wb" )) == NULL ) { 
+#else
 	if ( (of = fopen ( argv[4],"w" )) == NULL ) { 
+#endif
 		printf ("%s: Can't open output file %s\n",argv[0],argv[3]);
 		exit(-5);
 	}
@@ -232,7 +268,11 @@ void decode_file(char *file)
 	int rv=0;
 	struct stat st;
 
+#ifdef WIN32
+	if ( (ifd = open (file, O_RDONLY|O_BINARY))==-1 )  {
+#else
 	if ( (ifd = open (file, O_RDONLY))==-1 )  {
+#endif
 		printf("Error opening file %s: %s",file,strerror(errno));
 		exit (-1);
 	}	

+ 5 - 0
docsis_snmp.c

@@ -23,6 +23,11 @@
 #include "docsis.h"
 #include <ctype.h>
 
+#ifdef WIN32
+#undef OPAQUE_SPECIAL_TYPES
+#include "inet_aton.h"
+#endif
+
 extern unsigned int line; /* from a.l */
 
 #define PACKET_LENGTH (8 * 1024)

+ 1 - 0
docsis_symtable.h

@@ -158,6 +158,7 @@ symbol_type symtable[NUM_IDENTIFIERS] =  {
 {111,   "AdmQosParamsTimeout",	13,100, (get_ushort), 	(decode_ushort),    	0, 65535 },
 /* Downstream Service Flow Specific Params */
 {112,   "MaxDsLatency",		14,100, (get_uint), 	(decode_uint),    	0, 0 },
+/* Payload Header Suppression */
 {113,   "PHS",			26,  0, (get_nothing), 	(decode_aggregate),    	0, 0 },
 {114,   "ClassifierRef",	1, 113, (get_uchar), 	(decode_uchar),    	1, 255 },
 {115,   "ClassifierId",		2, 113, (get_ushort), 	(decode_ushort),    	1, 65535 },

+ 37 - 15
examples/docsis20.cfg

@@ -7,31 +7,52 @@ ServiceFlowId 2147483647;
 RulePriority 255;
 ActivationState 1;
 IpPacketClassifier {
-IpTos 0x00ffff;
-IpProto 234;
-IpSrcAddr 10.1.2.3;
-IpSrcMask 255.255.0.0;
-IpDstAddr 10.5.2.5;
-IpDstMask 255.255.0.0;
-SrcPortStart 80;
-SrcPortEnd 81;
-DstPortStart 500;
-DstPortEnd 501;
-}
+	IpTos 0x00ffff;
+	IpProto 234;
+	IpSrcAddr 10.1.2.3;
+	IpSrcMask 255.255.0.0;
+	IpDstAddr 10.5.2.5;
+	IpDstMask 255.255.0.0;
+	SrcPortStart 80;
+	SrcPortEnd 81;
+	DstPortStart 500;
+	DstPortEnd 501;
+	}
 }
 UsPacketClass {
 ClassifierRef 253;
 ClassifierId 65533;
 ServiceFlowRef 65533;
-ServiceFlowId 2147483647;
+ServiceFlowId 2147483645;
 RulePriority 255;
 ActivationState 1;
 LLCPacketClassifier {
-DstMacAddress 00:00:de:ad:be:ef/00:00:ff:ff:ff:ff;
-SrcMacAddress 00:a0:a0:a0:a0:a0;
-EtherType 0x030303;
+	DstMacAddress 00:00:de:ad:be:ef/00:00:ff:ff:ff:ff;
+	SrcMacAddress 00:a0:a0:a0:a0:a0;
+	EtherType 0x030303;
+	}
 }
+
+DsServiceFlow { 
+DsServiceFlowRef 65535;
+DsServiceFlowId 2147483647;
+TrafficPriority 6;
+MaxRateSustained 3421234;
+MaxTrafficBurst 564343;
+MaxDsLatency 7856345;
 }
+
+UsServiceFlow { 
+UsServiceFlowRef 65533;
+UsServiceFlowId 2147483645;
+TrafficPriority 6;
+MaxRateSustained 3421234;
+MaxTrafficBurst 564343;
+SchedulingType 3;
+MaxConcatenatedBurst 34534;
+ToleratedGrantJitter 4653512;
+}
+
 NetworkAccess 1;
 DownstreamFrequency 123000000;
 UpstreamChannelId 1;
@@ -43,6 +64,7 @@ PriorityUp 3;
 GuaranteedUp 32000;
 MaxBurstUp 254;
 }
+
 BaselinePrivacy {
 AuthTimeout 10;
 ReAuthTimeout 10;

+ 80 - 0
examples/docsis20_no_snmp.cfg

@@ -0,0 +1,80 @@
+Main {
+DsPacketClass {
+ClassifierRef 255;
+ClassifierId 65535;
+ServiceFlowRef 65535;
+ServiceFlowId 2147483647;
+RulePriority 255;
+ActivationState 1;
+IpPacketClassifier {
+	IpTos 0x00ffff;
+	IpProto 234;
+	IpSrcAddr 10.1.2.3;
+	IpSrcMask 255.255.0.0;
+	IpDstAddr 10.5.2.5;
+	IpDstMask 255.255.0.0;
+	SrcPortStart 80;
+	SrcPortEnd 81;
+	DstPortStart 500;
+	DstPortEnd 501;
+	}
+}
+UsPacketClass {
+ClassifierRef 253;
+ClassifierId 65533;
+ServiceFlowRef 65533;
+ServiceFlowId 2147483645;
+RulePriority 255;
+ActivationState 1;
+LLCPacketClassifier {
+	DstMacAddress 00:00:de:ad:be:ef/00:00:ff:ff:ff:ff;
+	SrcMacAddress 00:a0:a0:a0:a0:a0;
+	EtherType 0x030303;
+	}
+}
+
+DsServiceFlow { 
+DsServiceFlowRef 65535;
+DsServiceFlowId 2147483647;
+TrafficPriority 6;
+MaxRateSustained 3421234;
+MaxTrafficBurst 564343;
+MaxDsLatency 7856345;
+}
+
+UsServiceFlow { 
+UsServiceFlowRef 65533;
+UsServiceFlowId 2147483645;
+TrafficPriority 6;
+MaxRateSustained 3421234;
+MaxTrafficBurst 564343;
+SchedulingType 3;
+MaxConcatenatedBurst 34534;
+ToleratedGrantJitter 4653512;
+}
+
+NetworkAccess 1;
+DownstreamFrequency 123000000;
+UpstreamChannelId 1;
+
+ClassOfService { /* This is just for testing, shouldn't be here */
+ClassID 1;
+MaxRateDown 512000;
+MaxRateUp 64000;
+PriorityUp 3;
+GuaranteedUp 32000;
+MaxBurstUp 254;
+}
+
+BaselinePrivacy {
+AuthTimeout 10;
+ReAuthTimeout 10;
+AuthGraceTime 600;
+OperTimeout 10;
+ReKeyTimeout 10;
+TEKGraceTime 600;
+AuthRejectTimeout 9;
+}
+
+MaxCPE 3;
+}

+ 4 - 0
inet_aton.c

@@ -20,7 +20,11 @@
  *  DOCSIS is a registered trademark of Cablelabs, http://www.cablelabs.com
  */
 
+#ifdef WIN32
+#include <winsock.h>
+#else
 #include <arpa/inet.h>
+#endif
 
 /* 
  * Implements POSIX inet_aton which is missing on Solaris.

+ 4 - 0
inet_aton.h

@@ -21,6 +21,10 @@
  */
 
 
+#ifdef WIN32
+#include <winsock.h>
+#else
 #include <arpa/inet.h>
+#endif
 
 int inet_aton(const char *cp, struct in_addr *inp ) ;

+ 8 - 0
libyywrap.c

@@ -0,0 +1,8 @@
+/* libyywrap - flex run-time support library "yywrap" function */
+
+/* $Header: /home/daffy/u0/vern/flex/RCS/libyywrap.c,v 1.1 93/10/02 15:23:09 vern Exp $ */
+
+int yywrap()
+	{
+	return 1;
+	}

+ 1 - 1
version.h

@@ -20,4 +20,4 @@
  */
 
 #define VERSION "0.7"
-#define PATCHLEVEL "4"
+#define PATCHLEVEL "5"

+ 2 - 0
win32/testdec.bat

@@ -0,0 +1,2 @@
+@echo off
+for %%f in (..\examples\*.bin) do docsis_d -d %%f

+ 2 - 0
win32/testenc.bat

@@ -0,0 +1,2 @@
+@echo off
+for %%f in (..\examples\*.cfg) do docsis_d -e %%f ..\examples\keyfile %%f.bin

+ 234 - 0
win32/win32.dsp

@@ -0,0 +1,234 @@
+# Microsoft Developer Studio Project File - Name="win32" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** 編集しないでください **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=win32 - Win32 Debug
+!MESSAGE これは有効なメイクファイルではありません。 このプロジェクトをビルドするためには NMAKE を使用してください。
+!MESSAGE [メイクファイルのエクスポート] コマンドを使用して実行してください
+!MESSAGE 
+!MESSAGE NMAKE /f "win32.mak".
+!MESSAGE 
+!MESSAGE NMAKE の実行時に構成を指定できます
+!MESSAGE コマンド ライン上でマクロの設定を定義します。例:
+!MESSAGE 
+!MESSAGE NMAKE /f "win32.mak" CFG="win32 - Win32 Debug"
+!MESSAGE 
+!MESSAGE 選択可能なビルド モード:
+!MESSAGE 
+!MESSAGE "win32 - Win32 Release" ("Win32 (x86) Console Application" 用)
+!MESSAGE "win32 - Win32 Debug" ("Win32 (x86) Console Application" 用)
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "win32 - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "\usr\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x411 /d "NDEBUG"
+# ADD RSC /l 0x411 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib libsnmp.lib /nologo /subsystem:console /machine:I386 /out:"docsis.exe" /libpath:"\usr\lib"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF  "$(CFG)" == "win32 - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "\usr\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "DEBUG" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x411 /d "_DEBUG"
+# ADD RSC /l 0x411 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib libsnmp.lib /nologo /subsystem:console /debug /machine:I386 /out:"docsis_d.exe" /pdbtype:sept /libpath:"\usr\lib"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF 
+
+# Begin Target
+
+# Name "win32 - Win32 Release"
+# Name "win32 - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\docsis_decode.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\docsis_encode.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\docsis_main.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\docsis_snmp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\docsis_yy.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\ethermac.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\hmac_md5.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\inet_aton.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\libyywrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\md5.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\docsis.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\docsis_common.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\docsis_decode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\docsis_encode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\docsis_globals.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\docsis_symtable.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\ethermac.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\inet_aton.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\md5.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\version.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=..\docsis_lex.l
+
+!IF  "$(CFG)" == "win32 - Win32 Release"
+
+# Begin Custom Build
+InputPath=..\docsis_lex.l
+
+"../docsis_yy.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+	flex -o../docsis_yy.c ../docsis_lex.l
+
+# End Custom Build
+
+!ELSEIF  "$(CFG)" == "win32 - Win32 Debug"
+
+# Begin Custom Build
+InputPath=..\docsis_lex.l
+
+"../docsis_yy.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+	flex -o../docsis_yy.c ../docsis_lex.l
+
+# End Custom Build
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\docsis_yy.y
+
+!IF  "$(CFG)" == "win32 - Win32 Release"
+
+# Begin Custom Build
+InputPath=..\docsis_yy.y
+
+"../docsis_yy.tab.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+	bison -t -v ../docsis_yy.y
+
+# End Custom Build
+
+!ELSEIF  "$(CFG)" == "win32 - Win32 Debug"
+
+# Begin Custom Build
+InputPath=..\docsis_yy.y
+
+"../docsis_yy.tab.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+	bison -t -v ../docsis_yy.y
+
+# End Custom Build
+
+!ENDIF 
+
+# End Source File
+# End Target
+# End Project

+ 29 - 0
win32/win32.dsw

@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# 警告: このワークスペース ファイル を編集または削除しないでください!
+
+###############################################################################
+
+Project: "win32"=".\win32.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+