~ubuntu-branches/ubuntu/saucy/openvpn/saucy

« back to all changes in this revision

Viewing changes to tap-win32/macinfo.h

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Gonzalez Iniesta
  • Date: 2005-01-05 19:03:11 UTC
  • mto: (1.4.1) (10.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20050105190311-d0uioiqtor5xbzre
Tags: upstream-1.99+2.rc6
ImportĀ upstreamĀ versionĀ 1.99+2.rc6

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#ifndef MacInfoDefined
31
31
#define MacInfoDefined
32
32
 
33
 
#ifdef __cplusplus
34
 
extern "C" {
35
 
#endif
36
 
 
37
 
//=====================================================================================
38
 
//                                  NDIS + Win32 Settings
39
 
//=====================================================================================
40
 
#ifdef NDIS_MINIPORT_DRIVER
41
 
#   include <ndis.h>
42
 
#endif
43
 
 
44
33
//===================================================================================
45
34
//                                      Macros
46
35
//===================================================================================
47
36
#define IsMacDelimiter(a) (a == ':' || a == '-' || a == '.')
48
37
#define IsHexDigit(c) ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'))
49
38
 
50
 
#ifdef ASSERT
51
 
#   undef ASSERT
52
 
#endif
53
 
 
54
 
#define ASSERT(a) if (! (a)) return
55
 
 
56
 
//===================================================================================
57
 
//                          MAC Address Manipulation Routines
58
 
//===================================================================================
59
 
unsigned char HexStringToDecimalInt (unsigned char p_Character);
60
 
VOID ConvertMacInfo (MACADDR p_Destination, unsigned char *p_Source, unsigned long p_Length);
61
 
VOID GenerateRandomMac (MACADDR mac, unsigned char *adapter_name);
62
 
 
63
 
#define COPY_MAC(dest, src) NdisMoveMemory (dest, src, sizeof (MACADDR))
64
 
#define MAC_EQUAL(a,b) (memcmp (a, b, sizeof (MACADDR)) == 0)
65
 
 
66
 
#ifdef __cplusplus
67
 
}
68
 
#endif
 
39
#define COPY_MAC(dest, src) NdisMoveMemory ((dest), (src), sizeof (MACADDR))
 
40
#define CLEAR_MAC(dest)     NdisZeroMemory ((dest), sizeof (MACADDR))
 
41
#define MAC_EQUAL(a,b)      (memcmp ((a), (b), sizeof (MACADDR)) == 0)
69
42
 
70
43
#endif