VirtualBox

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

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

#3282 HostNetIf API: updated common part, added draft implementation for Solaris.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 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.215389.xyz. 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//#include "VBox/com/ptr.h"
38//#include <list>
39
40#if 1
41/**
42 * Encapsulation type.
43 */
44typedef enum NETIFTYPE
45{
46 NETIF_T_UNKNOWN,
47 NETIF_T_ETHERNET,
48 NETIF_T_PPP,
49 NETIF_T_SLIP
50} NETIFTYPE;
51
52/**
53 * Current state of the interface.
54 */
55typedef enum NETIFSTATUS
56{
57 NETIF_S_UNKNOWN,
58 NETIF_S_UP,
59 NETIF_S_DOWN
60} NETIFSTATUS;
61
62/**
63 * Host Network Interface Information.
64 */
65typedef struct NETIFINFO
66{
67 NETIFINFO *pNext;
68 RTNETADDRIPV4 IPAddress;
69 RTNETADDRIPV4 IPNetMask;
70 RTNETADDRIPV6 IPv6Address;
71 RTNETADDRIPV6 IPv6NetMask;
72 RTMAC MACAddress;
73 NETIFTYPE enmType;
74 NETIFSTATUS enmStatus;
75 RTUUID Uuid;
76 char szShortName[50];
77 char szName[1];
78} NETIFINFO;
79
80/** Pointer to a network interface info. */
81typedef NETIFINFO *PNETIFINFO;
82/** Pointer to a const network interface info. */
83typedef NETIFINFO const *PCNETIFINFO;
84#endif
85
86int NetIfList(std::list <ComObjPtr <HostNetworkInterface> > &list);
87
88#endif
89
Note: See TracBrowser for help on using the repository browser.

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