mirror of https://gitee.com/openkylin/linux.git
[CAN]: Allocate protocol numbers for PF_CAN
This patch adds a protocol/address family number, ARP hardware type, ethernet packet type, and a line discipline number for the SocketCAN implementation. Signed-off-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> Signed-off-by: Urs Thuermann <urs.thuermann@volkswagen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8dbde28d97
commit
cd05acfe65
|
@ -50,7 +50,9 @@
|
||||||
#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */
|
#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */
|
||||||
#define IFF_DORMANT 0x20000 /* driver signals dormant */
|
#define IFF_DORMANT 0x20000 /* driver signals dormant */
|
||||||
|
|
||||||
#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|\
|
#define IFF_ECHO 0x40000 /* echo sent packets */
|
||||||
|
|
||||||
|
#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
|
||||||
IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
|
IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
|
||||||
|
|
||||||
/* Private (from user) interface flags (netdevice->priv_flags). */
|
/* Private (from user) interface flags (netdevice->priv_flags). */
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
#define ARPHRD_ROSE 270
|
#define ARPHRD_ROSE 270
|
||||||
#define ARPHRD_X25 271 /* CCITT X.25 */
|
#define ARPHRD_X25 271 /* CCITT X.25 */
|
||||||
#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */
|
#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */
|
||||||
|
#define ARPHRD_CAN 280 /* Controller Area Network */
|
||||||
#define ARPHRD_PPP 512
|
#define ARPHRD_PPP 512
|
||||||
#define ARPHRD_CISCO 513 /* Cisco HDLC */
|
#define ARPHRD_CISCO 513 /* Cisco HDLC */
|
||||||
#define ARPHRD_HDLC ARPHRD_CISCO
|
#define ARPHRD_HDLC ARPHRD_CISCO
|
||||||
|
|
|
@ -90,6 +90,7 @@
|
||||||
#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/
|
#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/
|
||||||
#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */
|
#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */
|
||||||
#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */
|
#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */
|
||||||
|
#define ETH_P_CAN 0x000C /* Controller Area Network */
|
||||||
#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/
|
#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/
|
||||||
#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */
|
#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */
|
||||||
#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */
|
#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */
|
||||||
|
|
|
@ -185,6 +185,7 @@ struct ucred {
|
||||||
#define AF_PPPOX 24 /* PPPoX sockets */
|
#define AF_PPPOX 24 /* PPPoX sockets */
|
||||||
#define AF_WANPIPE 25 /* Wanpipe API Sockets */
|
#define AF_WANPIPE 25 /* Wanpipe API Sockets */
|
||||||
#define AF_LLC 26 /* Linux LLC */
|
#define AF_LLC 26 /* Linux LLC */
|
||||||
|
#define AF_CAN 29 /* Controller Area Network */
|
||||||
#define AF_TIPC 30 /* TIPC sockets */
|
#define AF_TIPC 30 /* TIPC sockets */
|
||||||
#define AF_BLUETOOTH 31 /* Bluetooth sockets */
|
#define AF_BLUETOOTH 31 /* Bluetooth sockets */
|
||||||
#define AF_IUCV 32 /* IUCV sockets */
|
#define AF_IUCV 32 /* IUCV sockets */
|
||||||
|
@ -220,6 +221,7 @@ struct ucred {
|
||||||
#define PF_PPPOX AF_PPPOX
|
#define PF_PPPOX AF_PPPOX
|
||||||
#define PF_WANPIPE AF_WANPIPE
|
#define PF_WANPIPE AF_WANPIPE
|
||||||
#define PF_LLC AF_LLC
|
#define PF_LLC AF_LLC
|
||||||
|
#define PF_CAN AF_CAN
|
||||||
#define PF_TIPC AF_TIPC
|
#define PF_TIPC AF_TIPC
|
||||||
#define PF_BLUETOOTH AF_BLUETOOTH
|
#define PF_BLUETOOTH AF_BLUETOOTH
|
||||||
#define PF_IUCV AF_IUCV
|
#define PF_IUCV AF_IUCV
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
*/
|
*/
|
||||||
#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */
|
#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */
|
||||||
#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */
|
#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */
|
||||||
#define NR_LDISCS 17
|
#define NR_LDISCS 18
|
||||||
|
|
||||||
/* line disciplines */
|
/* line disciplines */
|
||||||
#define N_TTY 0
|
#define N_TTY 0
|
||||||
|
@ -44,6 +44,7 @@
|
||||||
#define N_SYNC_PPP 14 /* synchronous PPP */
|
#define N_SYNC_PPP 14 /* synchronous PPP */
|
||||||
#define N_HCI 15 /* Bluetooth HCI UART */
|
#define N_HCI 15 /* Bluetooth HCI UART */
|
||||||
#define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */
|
#define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */
|
||||||
|
#define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This character is the same as _POSIX_VDISABLE: it cannot be used as
|
* This character is the same as _POSIX_VDISABLE: it cannot be used as
|
||||||
|
|
|
@ -154,7 +154,7 @@ static const char *af_family_key_strings[AF_MAX+1] = {
|
||||||
"sk_lock-AF_ASH" , "sk_lock-AF_ECONET" , "sk_lock-AF_ATMSVC" ,
|
"sk_lock-AF_ASH" , "sk_lock-AF_ECONET" , "sk_lock-AF_ATMSVC" ,
|
||||||
"sk_lock-21" , "sk_lock-AF_SNA" , "sk_lock-AF_IRDA" ,
|
"sk_lock-21" , "sk_lock-AF_SNA" , "sk_lock-AF_IRDA" ,
|
||||||
"sk_lock-AF_PPPOX" , "sk_lock-AF_WANPIPE" , "sk_lock-AF_LLC" ,
|
"sk_lock-AF_PPPOX" , "sk_lock-AF_WANPIPE" , "sk_lock-AF_LLC" ,
|
||||||
"sk_lock-27" , "sk_lock-28" , "sk_lock-29" ,
|
"sk_lock-27" , "sk_lock-28" , "sk_lock-AF_CAN" ,
|
||||||
"sk_lock-AF_TIPC" , "sk_lock-AF_BLUETOOTH", "sk_lock-IUCV" ,
|
"sk_lock-AF_TIPC" , "sk_lock-AF_BLUETOOTH", "sk_lock-IUCV" ,
|
||||||
"sk_lock-AF_RXRPC" , "sk_lock-AF_MAX"
|
"sk_lock-AF_RXRPC" , "sk_lock-AF_MAX"
|
||||||
};
|
};
|
||||||
|
@ -168,7 +168,7 @@ static const char *af_family_slock_key_strings[AF_MAX+1] = {
|
||||||
"slock-AF_ASH" , "slock-AF_ECONET" , "slock-AF_ATMSVC" ,
|
"slock-AF_ASH" , "slock-AF_ECONET" , "slock-AF_ATMSVC" ,
|
||||||
"slock-21" , "slock-AF_SNA" , "slock-AF_IRDA" ,
|
"slock-21" , "slock-AF_SNA" , "slock-AF_IRDA" ,
|
||||||
"slock-AF_PPPOX" , "slock-AF_WANPIPE" , "slock-AF_LLC" ,
|
"slock-AF_PPPOX" , "slock-AF_WANPIPE" , "slock-AF_LLC" ,
|
||||||
"slock-27" , "slock-28" , "slock-29" ,
|
"slock-27" , "slock-28" , "slock-AF_CAN" ,
|
||||||
"slock-AF_TIPC" , "slock-AF_BLUETOOTH", "slock-AF_IUCV" ,
|
"slock-AF_TIPC" , "slock-AF_BLUETOOTH", "slock-AF_IUCV" ,
|
||||||
"slock-AF_RXRPC" , "slock-AF_MAX"
|
"slock-AF_RXRPC" , "slock-AF_MAX"
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue