aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2016-04-28 11:55:30 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-29 16:09:44 -0400
commit96d934c70db6e1bc135600c57da1285eaf7efb26 (patch)
treeef01020246a3fbe5aa82f4d1460298e5008d28a0 /include/uapi/linux
parent7d9f0b48746d37e4381efc02da27535a0a1bac43 (diff)
ppp: add rtnetlink device creation support
Define PPP device handler for use with rtnetlink. The only PPP specific attribute is IFLA_PPP_DEV_FD. It is mandatory and contains the file descriptor of the associated /dev/ppp instance (the file descriptor which would have been used for ioctl(PPPIOCNEWUNIT) in the ioctl-based API). The PPP device is removed when this file descriptor is released (same behaviour as with ioctl based PPP devices). PPP devices created with the rtnetlink API behave like the ones created with ioctl(PPPIOCNEWUNIT). In particular existing ioctls work the same way, no matter how the PPP device was created. The rtnl callbacks are also assigned to ioctl based PPP devices. This way, rtnl messages have the same effect on any PPP devices. The immediate effect is that all PPP devices, even ioctl-based ones, can now be removed with "ip link del". A minor difference still exists between ioctl and rtnl based PPP interfaces: in the device name, the number following the "ppp" prefix corresponds to the PPP unit number for ioctl based devices, while it is just an unrelated incrementing index for rtnl ones. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/if_link.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index d82de331bb6b..3e80974566bb 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -520,6 +520,14 @@ enum {
520}; 520};
521#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) 521#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
522 522
523/* PPP section */
524enum {
525 IFLA_PPP_UNSPEC,
526 IFLA_PPP_DEV_FD,
527 __IFLA_PPP_MAX
528};
529#define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1)
530
523/* Bonding section */ 531/* Bonding section */
524 532
525enum { 533enum {