From 3ca01bf1e9bd5fe2181d8ad7ceac1efa8ccec1f8 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 29 Feb 2024 14:08:50 +0200 Subject: [PATCH 1/7] docker: Use libyang 2.1.128 for Alpine builds Signed-off-by: Donatas Abraitis --- docker/alpine/libyang/APKBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/alpine/libyang/APKBUILD b/docker/alpine/libyang/APKBUILD index 04e943fe48f7..6973fd62d865 100755 --- a/docker/alpine/libyang/APKBUILD +++ b/docker/alpine/libyang/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Sören Tempel # Maintainer: Christian Franke pkgname=libyang -pkgver=2.1.80 +pkgver=2.1.128 pkgrel=0 pkgdesc="YANG data modelling language parser and toolkit" url="https://github.com/CESNET/libyang" From f03b0bfaa4225182064d7749808b49760a618d29 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 29 Feb 2024 14:17:20 +0200 Subject: [PATCH 2/7] lib: Fix unknown sig_atomic_t compile error This is happening for Alpine Linux. ``` 26 64.59 ./lib/sigevent.h:23:18: error: unknown type name 'sig_atomic_t' 26 64.59 23 | volatile sig_atomic_t caught; /* private member */ 26 64.59 | ^~~~~~~~~~~~ 26 64.60 In file included from ./lib/libfrr.h:12, 26 64.60 from ./lib/vty.h:28, 26 64.60 from ./lib/command.h:11, 26 64.60 from ./lib/debug.h:11, 26 64.60 from ./mgmtd/mgmt.h:12, 26 64.60 from mgmtd/mgmt_history.c:14: 26 64.60 ./lib/sigevent.h:23:18: error: unknown type name 'sig_atomic_t' 26 64.60 23 | volatile sig_atomic_t caught; /* private member */ 26 64.60 | ^~~~~~~~~~~~ ``` Signed-off-by: Donatas Abraitis --- lib/frrevent.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/frrevent.h b/lib/frrevent.h index 998727f0799d..94640a76b70f 100644 --- a/lib/frrevent.h +++ b/lib/frrevent.h @@ -6,6 +6,7 @@ #ifndef _ZEBRA_THREAD_H #define _ZEBRA_THREAD_H +#include #include #include #include From e9ff59401c8b2242a159b1a78d8e2ca980da3272 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 29 Feb 2024 14:21:27 +0200 Subject: [PATCH 3/7] vtysh: Include fnctl.h for vtysh_main Fixing compilation for Alpine Linux: ``` 25 91.59 vtysh/vtysh_main.c: In function 'vtysh_flock_config': 25 91.59 vtysh/vtysh_main.c:276:20: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] 25 91.59 276 | flock_fd = open(flock_file, O_RDONLY, 0644); 25 91.59 | ^~~~ 25 91.59 | popen 25 91.60 vtysh/vtysh_main.c:276:37: error: 'O_RDONLY' undeclared (first use in this function) 25 91.60 276 | flock_fd = open(flock_file, O_RDONLY, 0644); 25 91.60 | ^~~~~~~~ 25 91.60 vtysh/vtysh_main.c:276:37: note: each undeclared identifier is reported only once for each function it appears in 25 91.60 CC zebra/if_netlink.o 25 91.61 vtysh/vtysh_main.c: In function 'main': 25 91.61 vtysh/vtysh_main.c:637:49: error: 'O_CREAT' undeclared (first use in this function) 25 91.61 637 | fp = open(history_file, O_CREAT | O_EXCL, 25 91.61 | ^~~~~~~ 25 91.62 vtysh/vtysh_main.c:637:59: error: 'O_EXCL' undeclared (first use in this function) 25 91.62 637 | fp = open(history_file, O_CREAT | O_EXCL, 25 91.62 | ^~~~~~ ``` Signed-off-by: Donatas Abraitis --- vtysh/vtysh_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index b1299780db53..464d82cf7fee 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -5,6 +5,7 @@ #include +#include #include #include #include From fd93b7d89a119e84773201a41bfe4a2357ba7640 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 29 Feb 2024 14:35:17 +0200 Subject: [PATCH 4/7] docker: Use Alpine Linux version 3.19 Signed-off-by: Donatas Abraitis --- docker/alpine/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile index 98e8407498d6..fb3ce83696b7 100644 --- a/docker/alpine/Dockerfile +++ b/docker/alpine/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 # Create a basic stage set up to build APKs -FROM alpine:3.18 as alpine-builder +FROM alpine:3.19 as alpine-builder RUN apk add \ --update-cache \ abuild \ @@ -24,7 +24,7 @@ RUN cd /src/libyang \ && abuild -r -P /pkgs/apk # This stage builds a dist tarball from the source -FROM alpine:3.18 as source-builder +FROM alpine:3.19 as source-builder RUN mkdir -p /src/alpine /pkgs/apk COPY alpine/APKBUILD.in /src/alpine COPY --from=alpine-apk-builder-libyang /pkgs/apk/src /pkgs/apk @@ -58,7 +58,7 @@ RUN cd /dist \ && abuild -r -P /pkgs/apk # This stage installs frr from the apk -FROM alpine:3.18 +FROM alpine:3.19 RUN mkdir -p /pkgs/apk COPY --from=alpine-apk-builder /pkgs/apk/ /pkgs/apk/ RUN apk add \ From 3f7cc3b7f5e7624ef72c455e8ab6c68884d1f9f4 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 29 Feb 2024 14:37:40 +0200 Subject: [PATCH 5/7] docker: Do not use pip Python package manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alpine Linux gets this with 3.19: This is already installed with `pytest` via apk package manager. ``` 15 78.20 error: externally-managed-environment 15 78.20 15 78.20 × This environment is externally managed 15 78.20 ╰─> 15 78.20 The system-wide python installation should be maintained using the system 15 78.20 package manager (apk) only. 15 78.20 15 78.20 If the package in question is not packaged already (and hence installable via 15 78.20 "apk add py3-somepackage"), please consider installing it inside a virtual 15 78.20 environment, e.g.: 15 78.20 15 78.20 python3 -m venv /path/to/venv 15 78.20 . /path/to/venv/bin/activate 15 78.20 pip install mypackage 15 78.20 15 78.20 To exit the virtual environment, run: 15 78.20 15 78.20 deactivate 15 78.20 15 78.20 The virtual environment is not deleted, and can be re-entered by re-sourcing 15 78.20 the activate file. 15 78.20 15 78.20 To automatically manage virtual environments, consider using pipx (from the 15 78.20 pipx package). 15 78.20 15 78.20 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. ``` Signed-off-by: Donatas Abraitis --- docker/alpine/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile index fb3ce83696b7..1cff06feee21 100644 --- a/docker/alpine/Dockerfile +++ b/docker/alpine/Dockerfile @@ -33,8 +33,7 @@ RUN source /src/alpine/APKBUILD.in \ && apk add \ --no-cache \ --update-cache \ - $makedepends \ - && pip install pytest + $makedepends COPY . /src ARG PKGVER RUN cd /src \ From b0b0d7ab08960ed7b43b4d1dabeaf377fad40942 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 29 Feb 2024 14:43:57 +0200 Subject: [PATCH 6/7] docker: Fix post function for Alpine build (package) It was using a wrong sysdir. ``` -------------------- 72 | # Own the config / PID files 73 | RUN mkdir -p /var/run/frr 74 | >>> RUN chown -R frr:frr /etc/frr /var/run/frr 75 | 76 | # Simple init manager for reaping processes and forwarding signals -------------------- ``` Signed-off-by: Donatas Abraitis --- alpine/APKBUILD.in | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/alpine/APKBUILD.in b/alpine/APKBUILD.in index 98d3e51452f4..2cb3feec157f 100644 --- a/alpine/APKBUILD.in +++ b/alpine/APKBUILD.in @@ -27,6 +27,7 @@ source="$pkgname-$pkgver.tar.gz" builddir="$srcdir"/$pkgname-$pkgver +_sysconfdir=/etc _sbindir=/usr/lib/frr _libdir=/usr/lib _user=frr @@ -36,7 +37,7 @@ build() { ./configure \ --prefix=/usr \ - --sysconfdir=/etc \ + --sysconfdir=$_sysconfdir \ --localstatedir=/var \ --sbindir=$_sbindir \ --libdir=$_libdir \ @@ -61,7 +62,9 @@ package() { cd "$builddir" make DESTDIR="$pkgdir" install - install -Dm644 "$builddir"/tools/etc/frr/daemons "$pkgdir"$_sysconfdir/daemons - install -d "$pkgdir"/etc/init.d - ln -s ${_sbindir}/frr "$pkgdir"/etc/init.d/frr + install -d $pkgdir/$_sysconfdir/frr + install -m 0644 tools/etc/frr/daemons $pkgdir/$_sysconfdir/frr/daemons + + install -d $pkgdir/$_sysconfdir/init.d + ln -s ${_sbindir}/frr $pkgdir/$_sysconfdir/init.d/frr } From a201559a4ad9146ca978bfb21afd50de1b4434b1 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Sat, 9 Mar 2024 09:34:41 +0200 Subject: [PATCH 7/7] lib: Drop include/linux/mroute[6].h Not needed anymore since https://github.com/FRRouting/frr/pull/15509/commits/a5389154a1363ea778e0cafddc34f1964631278c. Signed-off-by: Donatas Abraitis --- include/linux/mroute.h | 193 ---------------------------------------- include/linux/mroute6.h | 164 ---------------------------------- include/subdir.am | 2 - 3 files changed, 359 deletions(-) delete mode 100644 include/linux/mroute.h delete mode 100644 include/linux/mroute6.h diff --git a/include/linux/mroute.h b/include/linux/mroute.h deleted file mode 100644 index a0bfdcb53ee2..000000000000 --- a/include/linux/mroute.h +++ /dev/null @@ -1,193 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _UAPI__LINUX_MROUTE_H -#define _UAPI__LINUX_MROUTE_H - -#ifdef __LINUX__ -#include -#include -#endif -#include /* For struct in_addr. */ - -/* Based on the MROUTING 3.5 defines primarily to keep - * source compatibility with BSD. - * - * See the mrouted code for the original history. - * - * Protocol Independent Multicast (PIM) data structures included - * Carlos Picoto (cap@di.fc.ul.pt) - */ - -#define MRT_BASE 200 -#define MRT_INIT (MRT_BASE) /* Activate the kernel mroute code */ -#define MRT_DONE (MRT_BASE+1) /* Shutdown the kernel mroute */ -#define MRT_ADD_VIF (MRT_BASE+2) /* Add a virtual interface */ -#define MRT_DEL_VIF (MRT_BASE+3) /* Delete a virtual interface */ -#define MRT_ADD_MFC (MRT_BASE+4) /* Add a multicast forwarding entry */ -#define MRT_DEL_MFC (MRT_BASE+5) /* Delete a multicast forwarding entry */ -#define MRT_VERSION (MRT_BASE+6) /* Get the kernel multicast version */ -#define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */ -#define MRT_PIM (MRT_BASE+8) /* enable PIM code */ -#define MRT_TABLE (MRT_BASE+9) /* Specify mroute table ID */ -#define MRT_ADD_MFC_PROXY (MRT_BASE+10) /* Add a (*,*|G) mfc entry */ -#define MRT_DEL_MFC_PROXY (MRT_BASE+11) /* Del a (*,*|G) mfc entry */ -#define MRT_FLUSH (MRT_BASE+12) /* Flush all mfc entries and/or vifs */ -#define MRT_MAX (MRT_BASE+12) - -#ifndef SIOCGETVIFCNT -#define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */ -#define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) -#define SIOCGETRPF (SIOCPROTOPRIVATE+2) -#endif - -#ifndef MAXVIFS -#define MAXVIFS 32 -#endif -/* MRT_FLUSH optional flags */ -#define MRT_FLUSH_MFC 1 /* Flush multicast entries */ -#define MRT_FLUSH_MFC_STATIC 2 /* Flush static multicast entries */ -#define MRT_FLUSH_VIFS 4 /* Flush multicast vifs */ -#define MRT_FLUSH_VIFS_STATIC 8 /* Flush static multicast vifs */ - -typedef unsigned long vifbitmap_t; /* User mode code depends on this lot */ -typedef unsigned short vifi_t; -#define ALL_VIFS ((vifi_t)(-1)) - -/* Same idea as select */ - -#define VIFM_SET(n,m) ((m)|=(1<<(n))) -#define VIFM_CLR(n,m) ((m)&=~(1<<(n))) -#define VIFM_ISSET(n,m) ((m)&(1<<(n))) -#define VIFM_CLRALL(m) ((m)=0) -#define VIFM_COPY(mfrom,mto) ((mto)=(mfrom)) -#define VIFM_SAME(m1,m2) ((m1)==(m2)) - -/* Passed by mrouted for an MRT_ADD_VIF - again we use the - * mrouted 3.6 structures for compatibility - */ -struct vifctl { - vifi_t vifc_vifi; /* Index of VIF */ - unsigned char vifc_flags; /* VIFF_ flags */ - unsigned char vifc_threshold; /* ttl limit */ - unsigned int vifc_rate_limit; /* Rate limiter values (NI) */ - union { - struct in_addr vifc_lcl_addr; /* Local interface address */ - int vifc_lcl_ifindex; /* Local interface index */ - }; - struct in_addr vifc_rmt_addr; /* IPIP tunnel addr */ -}; - -#define VIFF_TUNNEL 0x1 /* IPIP tunnel */ -#define VIFF_SRCRT 0x2 /* NI */ -#define VIFF_REGISTER 0x4 /* register vif */ -#define VIFF_USE_IFINDEX 0x8 /* use vifc_lcl_ifindex instead of - vifc_lcl_addr to find an interface */ - -/* Cache manipulation structures for mrouted and PIMd */ -struct mfcctl { - struct in_addr mfcc_origin; /* Origin of mcast */ - struct in_addr mfcc_mcastgrp; /* Group in question */ - vifi_t mfcc_parent; /* Where it arrived */ - unsigned char mfcc_ttls[MAXVIFS]; /* Where it is going */ - unsigned int mfcc_pkt_cnt; /* pkt count for src-grp */ - unsigned int mfcc_byte_cnt; - unsigned int mfcc_wrong_if; - int mfcc_expire; -}; - -/* Group count retrieval for mrouted */ -struct sioc_sg_req { - struct in_addr src; - struct in_addr grp; - unsigned long pktcnt; - unsigned long bytecnt; - unsigned long wrong_if; -}; - -/* To get vif packet counts */ -struct sioc_vif_req { - vifi_t vifi; /* Which iface */ - unsigned long icount; /* In packets */ - unsigned long ocount; /* Out packets */ - unsigned long ibytes; /* In bytes */ - unsigned long obytes; /* Out bytes */ -}; - -/* This is the format the mroute daemon expects to see IGMP control - * data. Magically happens to be like an IP packet as per the original - */ -struct igmpmsg { - uint32_t unused1,unused2; - unsigned char im_msgtype; /* What is this */ - unsigned char im_mbz; /* Must be zero */ - unsigned char im_vif; /* Low 8 bits of Interface */ - unsigned char im_vif_hi; /* High 8 bits of Interface */ - struct in_addr im_src,im_dst; -}; - -/* ipmr netlink table attributes */ -enum { - IPMRA_TABLE_UNSPEC, - IPMRA_TABLE_ID, - IPMRA_TABLE_CACHE_RES_QUEUE_LEN, - IPMRA_TABLE_MROUTE_REG_VIF_NUM, - IPMRA_TABLE_MROUTE_DO_ASSERT, - IPMRA_TABLE_MROUTE_DO_PIM, - IPMRA_TABLE_VIFS, - IPMRA_TABLE_MROUTE_DO_WRVIFWHOLE, - __IPMRA_TABLE_MAX -}; -#define IPMRA_TABLE_MAX (__IPMRA_TABLE_MAX - 1) - -/* ipmr netlink vif attribute format - * [ IPMRA_TABLE_VIFS ] - nested attribute - * [ IPMRA_VIF ] - nested attribute - * [ IPMRA_VIFA_xxx ] - */ -enum { - IPMRA_VIF_UNSPEC, - IPMRA_VIF, - __IPMRA_VIF_MAX -}; -#define IPMRA_VIF_MAX (__IPMRA_VIF_MAX - 1) - -/* vif-specific attributes */ -enum { - IPMRA_VIFA_UNSPEC, - IPMRA_VIFA_IFINDEX, - IPMRA_VIFA_VIF_ID, - IPMRA_VIFA_FLAGS, - IPMRA_VIFA_BYTES_IN, - IPMRA_VIFA_BYTES_OUT, - IPMRA_VIFA_PACKETS_IN, - IPMRA_VIFA_PACKETS_OUT, - IPMRA_VIFA_LOCAL_ADDR, - IPMRA_VIFA_REMOTE_ADDR, - IPMRA_VIFA_PAD, - __IPMRA_VIFA_MAX -}; -#define IPMRA_VIFA_MAX (__IPMRA_VIFA_MAX - 1) - -/* ipmr netlink cache report attributes */ -enum { - IPMRA_CREPORT_UNSPEC, - IPMRA_CREPORT_MSGTYPE, - IPMRA_CREPORT_VIF_ID, - IPMRA_CREPORT_SRC_ADDR, - IPMRA_CREPORT_DST_ADDR, - IPMRA_CREPORT_PKT, - IPMRA_CREPORT_TABLE, - __IPMRA_CREPORT_MAX -}; -#define IPMRA_CREPORT_MAX (__IPMRA_CREPORT_MAX - 1) - -/* That's all usermode folks */ - -#define MFC_ASSERT_THRESH (3*HZ) /* Maximal freq. of asserts */ - -/* Pseudo messages used by mrouted */ -#define IGMPMSG_NOCACHE 1 /* Kern cache fill request to mrouted */ -#define IGMPMSG_WRONGVIF 2 /* For PIM assert processing (unused) */ -#define IGMPMSG_WHOLEPKT 3 /* For PIM Register processing */ -#define IGMPMSG_WRVIFWHOLE 4 /* For PIM Register and assert processing */ - -#endif /* _UAPI__LINUX_MROUTE_H */ diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h deleted file mode 100644 index 8c0640671a6e..000000000000 --- a/include/linux/mroute6.h +++ /dev/null @@ -1,164 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _UAPI__LINUX_MROUTE6_H -#define _UAPI__LINUX_MROUTE6_H - -#ifdef __LINUX__ -#include -#include -#include -#endif -#include /* For struct sockaddr_in6. */ - -/* - * Based on the MROUTING 3.5 defines primarily to keep - * source compatibility with BSD. - * - * See the pim6sd code for the original history. - * - * Protocol Independent Multicast (PIM) data structures included - * Carlos Picoto (cap@di.fc.ul.pt) - * - */ - -#define MRT6_BASE 200 -#define MRT6_INIT (MRT6_BASE) /* Activate the kernel mroute code */ -#define MRT6_DONE (MRT6_BASE+1) /* Shutdown the kernel mroute */ -#define MRT6_ADD_MIF (MRT6_BASE+2) /* Add a virtual interface */ -#define MRT6_DEL_MIF (MRT6_BASE+3) /* Delete a virtual interface */ -#define MRT6_ADD_MFC (MRT6_BASE+4) /* Add a multicast forwarding entry */ -#define MRT6_DEL_MFC (MRT6_BASE+5) /* Delete a multicast forwarding entry */ -#define MRT6_VERSION (MRT6_BASE+6) /* Get the kernel multicast version */ -#define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */ -#define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */ -#define MRT6_TABLE (MRT6_BASE+9) /* Specify mroute table ID */ -#define MRT6_ADD_MFC_PROXY (MRT6_BASE+10) /* Add a (*,*|G) mfc entry */ -#define MRT6_DEL_MFC_PROXY (MRT6_BASE+11) /* Del a (*,*|G) mfc entry */ -#define MRT6_FLUSH (MRT6_BASE+12) /* Flush all mfc entries and/or vifs */ -#define MRT6_MAX (MRT6_BASE+12) - -#ifndef SIOCGETMIFCNT_IN6 -#define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */ -#define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1) -#define SIOCGETRPF (SIOCPROTOPRIVATE+2) -#endif - -#ifndef MAXMIFS -#define MAXMIFS 32 -#endif -/* MRT6_FLUSH optional flags */ -#define MRT6_FLUSH_MFC 1 /* Flush multicast entries */ -#define MRT6_FLUSH_MFC_STATIC 2 /* Flush static multicast entries */ -#define MRT6_FLUSH_MIFS 4 /* Flushing multicast vifs */ -#define MRT6_FLUSH_MIFS_STATIC 8 /* Flush static multicast vifs */ - -typedef unsigned long mifbitmap_t; /* User mode code depends on this lot */ -typedef unsigned short mifi_t; -#define ALL_MIFS ((mifi_t)(-1)) - -#ifndef IF_SETSIZE -#define IF_SETSIZE 256 -#endif - -typedef uint32_t if_mask; -#define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */ - -typedef struct if_set { - /* __KERNEL_DIV_ROUND_UP() */ - if_mask ifs_bits[(IF_SETSIZE + NIFBITS - 1) / NIFBITS]; -} if_set; - -#define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS))) -#define IF_CLR(n, p) ((p)->ifs_bits[(n)/NIFBITS] &= ~(1 << ((n) % NIFBITS))) -#define IF_ISSET(n, p) ((p)->ifs_bits[(n)/NIFBITS] & (1 << ((n) % NIFBITS))) -#define IF_COPY(f, t) bcopy(f, t, sizeof(*(f))) -#define IF_ZERO(p) bzero(p, sizeof(*(p))) - -/* - * Passed by mrouted for an MRT_ADD_MIF - again we use the - * mrouted 3.6 structures for compatibility - */ - -struct mif6ctl { - mifi_t mif6c_mifi; /* Index of MIF */ - unsigned char mif6c_flags; /* MIFF_ flags */ - unsigned char vifc_threshold; /* ttl limit */ - __u16 mif6c_pifi; /* the index of the physical IF */ - unsigned int vifc_rate_limit; /* Rate limiter values (NI) */ -}; - -#define MIFF_REGISTER 0x1 /* register vif */ - -/* - * Cache manipulation structures for mrouted and PIMd - */ - -struct mf6cctl { - struct sockaddr_in6 mf6cc_origin; /* Origin of mcast */ - struct sockaddr_in6 mf6cc_mcastgrp; /* Group in question */ - mifi_t mf6cc_parent; /* Where it arrived */ - struct if_set mf6cc_ifset; /* Where it is going */ -}; - -/* - * Group count retrieval for pim6sd - */ - -struct sioc_sg_req6 { - struct sockaddr_in6 src; - struct sockaddr_in6 grp; - unsigned long pktcnt; - unsigned long bytecnt; - unsigned long wrong_if; -}; - -/* - * To get vif packet counts - */ - -struct sioc_mif_req6 { - mifi_t mifi; /* Which iface */ - unsigned long icount; /* In packets */ - unsigned long ocount; /* Out packets */ - unsigned long ibytes; /* In bytes */ - unsigned long obytes; /* Out bytes */ -}; - -/* - * That's all usermode folks - */ - - - -/* - * Structure used to communicate from kernel to multicast router. - * We'll overlay the structure onto an MLD header (not an IPv6 heder like igmpmsg{} - * used for IPv4 implementation). This is because this structure will be passed via an - * IPv6 raw socket, on which an application will only receiver the payload i.e the data after - * the IPv6 header and all the extension headers. (See section 3 of RFC 3542) - */ - -struct mrt6msg { -#define MRT6MSG_NOCACHE 1 -#define MRT6MSG_WRONGMIF 2 -#define MRT6MSG_WHOLEPKT 3 /* used for use level encap */ -#define MRT6MSG_WRMIFWHOLE 4 /* For PIM Register and assert processing */ - __u8 im6_mbz; /* must be zero */ - __u8 im6_msgtype; /* what type of message */ - __u16 im6_mif; /* mif rec'd on */ - __u32 im6_pad; /* padding for 64 bit arch */ - struct in6_addr im6_src, im6_dst; -}; - -/* ip6mr netlink cache report attributes */ -enum { - IP6MRA_CREPORT_UNSPEC, - IP6MRA_CREPORT_MSGTYPE, - IP6MRA_CREPORT_MIF_ID, - IP6MRA_CREPORT_SRC_ADDR, - IP6MRA_CREPORT_DST_ADDR, - IP6MRA_CREPORT_PKT, - __IP6MRA_CREPORT_MAX -}; -#define IP6MRA_CREPORT_MAX (__IP6MRA_CREPORT_MAX - 1) - -#endif /* _UAPI__LINUX_MROUTE6_H */ diff --git a/include/subdir.am b/include/subdir.am index 4fa88a0afd51..6f07b6bf103d 100644 --- a/include/subdir.am +++ b/include/subdir.am @@ -17,7 +17,5 @@ noinst_HEADERS += \ include/linux/seg6_hmac.h \ include/linux/seg6_iptunnel.h \ include/linux/seg6_local.h \ - include/linux/mroute.h \ - include/linux/mroute6.h \ include/linux/pkt_cls.h \ # end