comparison druntime/import/core/sys/posix/net/if_.d @ 1458:e0b2d67cfe7c

Added druntime (this should be removed once it works).
author Robert Clipsham <robert@octarineparrot.com>
date Tue, 02 Jun 2009 17:43:06 +0100
parents
children
comparison
equal deleted inserted replaced
1456:7b218ec1044f 1458:e0b2d67cfe7c
1 /**
2 * D header file for POSIX.
3 *
4 * Copyright: Copyright Sean Kelly 2005 - 2009.
5 * License: <a href="http://www.boost.org/LICENSE_1_0.txt>Boost License 1.0</a>.
6 * Authors: Sean Kelly
7 * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
8 *
9 * Copyright Sean Kelly 2005 - 2009.
10 * Distributed under the Boost Software License, Version 1.0.
11 * (See accompanying file LICENSE_1_0.txt or copy at
12 * http://www.boost.org/LICENSE_1_0.txt)
13 */
14 module core.sys.posix.net.if_;
15
16 private import core.sys.posix.config;
17
18 extern (C):
19
20 //
21 // Required
22 //
23 /*
24 struct if_nameindex // renamed to if_nameindex_t
25 {
26 uint if_index;
27 char* if_name;
28 }
29
30 IF_NAMESIZE
31
32 uint if_nametoindex(in char*);
33 char* if_indextoname(uint, char*);
34 if_nameindex_t* if_nameindex();
35 void if_freenameindex(if_nameindex_t*);
36 */
37
38 version( linux )
39 {
40 struct if_nameindex_t
41 {
42 uint if_index;
43 char* if_name;
44 }
45
46 enum IF_NAMESIZE = 16;
47
48 uint if_nametoindex(in char*);
49 char* if_indextoname(uint, char*);
50 if_nameindex_t* if_nameindex();
51 void if_freenameindex(if_nameindex_t*);
52 }
53 else version( OSX )
54 {
55 struct if_nameindex_t
56 {
57 uint if_index;
58 char* if_name;
59 }
60
61 enum IF_NAMESIZE = 16;
62
63 uint if_nametoindex(in char*);
64 char* if_indextoname(uint, char*);
65 if_nameindex_t* if_nameindex();
66 void if_freenameindex(if_nameindex_t*);
67 }
68 else version( freebsd )
69 {
70 struct if_nameindex_t
71 {
72 uint if_index;
73 char* if_name;
74 }
75
76 enum IF_NAMESIZE = 16;
77
78 uint if_nametoindex(in char*);
79 char* if_indextoname(uint, char*);
80 if_nameindex_t* if_nameindex();
81 void if_freenameindex(if_nameindex_t*);
82 }