VirtualBox

source: vbox/trunk/src/VBox/Main/include/netif.h@ 15372

Last change on this file since 15372 was 15372, checked in by vboxsync, 16 years ago

#3282: HostNetIf API implementation for Darwin. Common part revised. Stubs for other platforms.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/** @file
2 * Main - Network Interfaces.
3 */
4
5/*
6 * Copyright (C) 2008 Sun Microsystems, Inc.
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 *
25 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
26 * Clara, CA 95054 USA or visit http://www.sun.com if you need
27 * additional information or have any questions.
28 */
29
30#ifndef ___netif_h
31#define ___netif_h
32
33#include <iprt/cdefs.h>
34#include <iprt/types.h>
35#include <iprt/net.h>
36
37
38/**
39 * Encapsulation type.
40 */
41typedef enum NETIFTYPE
42{
43 NETIF_T_UNKNOWN,
44 NETIF_T_ETHERNET,
45 NETIF_T_PPP,
46 NETIF_T_SLIP
47} NETIFTYPE;
48
49/**
50 * Current state of the interface.
51 */
52typedef enum NETIFSTATUS
53{
54 NETIF_S_UNKNOWN,
55 NETIF_S_UP,
56 NETIF_S_DOWN
57} NETIFSTATUS;
58
59/**
60 * Host Network Interface Information.
61 */
62typedef struct NETIFINFO
63{
64 NETIFINFO *pNext;
65 RTNETADDRIPV4 IPAddress;
66 RTNETADDRIPV4 IPNetMask;
67 RTNETADDRIPV6 IPv6Address;
68 RTNETADDRIPV6 IPv6NetMask;
69 RTMAC MACAddress;
70 NETIFTYPE enmType;
71 NETIFSTATUS enmStatus;
72 RTUUID Uuid;
73 char szShortName[50];
74 char szName[1];
75} NETIFINFO;
76
77/** Pointer to a network interface info. */
78typedef NETIFINFO *PNETIFINFO;
79/** Pointer to a const network interface info. */
80typedef NETIFINFO const *PCNETIFINFO;
81
82PNETIFINFO NetIfList();
83
84#endif
85
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette