BindingFlags.Public needed here as Exception.HResult is now public in .NET 4.5. This...
[mono.git] / mcs / class / System / System.Net.NetworkInformation / MacOsNetworkInterfaceMarshal.cs
1 #if NET_2_0
2 using System;
3 using System.Runtime.InteropServices;
4
5 namespace System.Net.NetworkInformation {
6         namespace MacOsStructs {
7                 internal struct ifaddrs
8                 {
9                         public IntPtr  ifa_next;
10                         public string  ifa_name;
11                         public uint    ifa_flags;
12                         public IntPtr  ifa_addr;
13                         public IntPtr  ifa_netmask;
14                         public IntPtr  ifa_dstaddr;
15                         public IntPtr  ifa_data;
16                 }
17
18                 internal struct sockaddr
19                 {
20                         public byte  sa_len;
21                         public byte  sa_family;
22                 }
23
24                 internal struct sockaddr_in
25                 {
26                         public byte   sin_len;
27                         public byte   sin_family;
28                         public ushort sin_port;
29                         public uint   sin_addr;
30                 }
31
32                 internal struct in6_addr
33                 {
34                         [MarshalAs (UnmanagedType.ByValArray, SizeConst=16)]
35                         public byte[] u6_addr8;
36                 }
37
38                 internal struct sockaddr_in6
39                 {
40                         public byte     sin6_len;
41                         public byte     sin6_family;
42                         public ushort   sin6_port;
43                         public uint     sin6_flowinfo;
44                         public in6_addr sin6_addr;
45                         public uint     sin6_scope_id;
46                 }
47
48                 internal struct sockaddr_dl
49                 {
50                         public byte   sdl_len;
51                         public byte   sdl_family;
52                         public ushort sdl_index;
53                         public byte   sdl_type;
54                         public byte   sdl_nlen;
55                         public byte   sdl_alen;
56                         public byte   sdl_slen;
57
58                         [MarshalAs (UnmanagedType.ByValArray, SizeConst=12)]
59                         public byte[] sdl_data;
60                 }
61
62         }
63
64         internal enum MacOsArpHardware {
65                 ETHER = 0x6,
66                 ATM = 0x25,
67                 SLIP = 0x1c,
68                 PPP = 0x17,
69                 LOOPBACK = 0x18,
70                 FDDI = 0xf
71         }
72 }
73 #endif