David Howells | 607ca46 | 2012-10-13 10:46:48 +0100 | [diff] [blame] | 1 | /* |
| 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX |
| 3 | * operating system. INET is implemented using the BSD Socket |
| 4 | * interface as the means of communication with the user level. |
| 5 | * |
| 6 | * Definitions for the Interfaces handler. |
| 7 | * |
| 8 | * Version: @(#)dev.h 1.0.10 08/12/93 |
| 9 | * |
| 10 | * Authors: Ross Biro |
| 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
| 12 | * Corey Minyard <wf-rch!minyard@relay.EU.net> |
| 13 | * Donald J. Becker, <becker@cesdis.gsfc.nasa.gov> |
| 14 | * Alan Cox, <alan@lxorguk.ukuu.org.uk> |
| 15 | * Bjorn Ekwall. <bj0rn@blox.se> |
| 16 | * Pekka Riikonen <priikone@poseidon.pspt.fi> |
| 17 | * |
| 18 | * This program is free software; you can redistribute it and/or |
| 19 | * modify it under the terms of the GNU General Public License |
| 20 | * as published by the Free Software Foundation; either version |
| 21 | * 2 of the License, or (at your option) any later version. |
| 22 | * |
| 23 | * Moved to /usr/include/linux for NET3 |
| 24 | */ |
| 25 | #ifndef _UAPI_LINUX_NETDEVICE_H |
| 26 | #define _UAPI_LINUX_NETDEVICE_H |
| 27 | |
| 28 | #include <linux/if.h> |
| 29 | #include <linux/if_ether.h> |
| 30 | #include <linux/if_packet.h> |
| 31 | #include <linux/if_link.h> |
| 32 | |
| 33 | |
| 34 | #define MAX_ADDR_LEN 32 /* Largest hardware address length */ |
| 35 | |
| 36 | /* Initial net device group. All devices belong to group 0 by default. */ |
| 37 | #define INIT_NETDEV_GROUP 0 |
| 38 | |
| 39 | |
Tom Gundersen | 685343f | 2014-07-14 16:37:22 +0200 | [diff] [blame] | 40 | /* interface name assignment types (sysfs name_assign_type attribute) */ |
| 41 | #define NET_NAME_UNKNOWN 0 /* unknown origin (not exposed to userspace) */ |
| 42 | #define NET_NAME_ENUM 1 /* enumerated by kernel */ |
| 43 | #define NET_NAME_PREDICTABLE 2 /* predictably named by the kernel */ |
| 44 | #define NET_NAME_USER 3 /* provided by user-space */ |
| 45 | #define NET_NAME_RENAMED 4 /* renamed by user-space */ |
David Howells | 607ca46 | 2012-10-13 10:46:48 +0100 | [diff] [blame] | 46 | |
| 47 | /* Media selection options. */ |
| 48 | enum { |
| 49 | IF_PORT_UNKNOWN = 0, |
| 50 | IF_PORT_10BASE2, |
| 51 | IF_PORT_10BASET, |
| 52 | IF_PORT_AUI, |
| 53 | IF_PORT_100BASET, |
| 54 | IF_PORT_100BASETX, |
| 55 | IF_PORT_100BASEFX |
| 56 | }; |
| 57 | |
Florian Fainelli | 339e022 | 2014-03-28 14:25:58 -0700 | [diff] [blame] | 58 | /* hardware address assignment types */ |
| 59 | #define NET_ADDR_PERM 0 /* address is permanent (default) */ |
| 60 | #define NET_ADDR_RANDOM 1 /* address is generated randomly */ |
| 61 | #define NET_ADDR_STOLEN 2 /* address is stolen from other device */ |
| 62 | #define NET_ADDR_SET 3 /* address is set using |
| 63 | * dev_set_mac_address() */ |
David Howells | 607ca46 | 2012-10-13 10:46:48 +0100 | [diff] [blame] | 64 | |
| 65 | #endif /* _UAPI_LINUX_NETDEVICE_H */ |