Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI_LINUX_IGMP_H |
| 20 | #define _UAPI_LINUX_IGMP_H |
| 21 | #include <linux/types.h> |
| 22 | #include <asm/byteorder.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | struct igmphdr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 24 | __u8 type; |
| 25 | __u8 code; |
| 26 | __sum16 csum; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | __be32 group; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | }; |
| 29 | #define IGMPV3_MODE_IS_INCLUDE 1 |
| 30 | #define IGMPV3_MODE_IS_EXCLUDE 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define IGMPV3_CHANGE_TO_INCLUDE 3 |
| 32 | #define IGMPV3_CHANGE_TO_EXCLUDE 4 |
| 33 | #define IGMPV3_ALLOW_NEW_SOURCES 5 |
| 34 | #define IGMPV3_BLOCK_OLD_SOURCES 6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | struct igmpv3_grec { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 36 | __u8 grec_type; |
| 37 | __u8 grec_auxwords; |
| 38 | __be16 grec_nsrcs; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | __be32 grec_mca; |
| 40 | __be32 grec_src[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 41 | }; |
| 42 | struct igmpv3_report { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | __u8 type; |
| 44 | __u8 resv1; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 45 | __sum16 csum; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 46 | __be16 resv2; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __be16 ngrec; |
| 48 | struct igmpv3_grec grec[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 49 | }; |
| 50 | struct igmpv3_query { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | __u8 type; |
| 52 | __u8 code; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 53 | __sum16 csum; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 54 | __be32 group; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | #ifdef __LITTLE_ENDIAN_BITFIELD |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 | __u8 qrv : 3, suppress : 1, resv : 4; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 57 | #elif defined(__BIG_ENDIAN_BITFIELD) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 58 | __u8 resv : 4, suppress : 1, qrv : 3; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #else |
| 60 | #error "Please fix <asm/byteorder.h>" |
| 61 | #endif |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 62 | __u8 qqic; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | __be16 nsrcs; |
| 64 | __be32 srcs[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 65 | }; |
| 66 | #define IGMP_HOST_MEMBERSHIP_QUERY 0x11 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | #define IGMP_HOST_MEMBERSHIP_REPORT 0x12 |
| 68 | #define IGMP_DVMRP 0x13 |
| 69 | #define IGMP_PIM 0x14 |
| 70 | #define IGMP_TRACE 0x15 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 71 | #define IGMPV2_HOST_MEMBERSHIP_REPORT 0x16 |
| 72 | #define IGMP_HOST_LEAVE_MESSAGE 0x17 |
| 73 | #define IGMPV3_HOST_MEMBERSHIP_REPORT 0x22 |
| 74 | #define IGMP_MTRACE_RESP 0x1e |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | #define IGMP_MTRACE 0x1f |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 76 | #define IGMP_MRDISC_ADV 0x30 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 77 | #define IGMP_DELAYING_MEMBER 0x01 |
| 78 | #define IGMP_IDLE_MEMBER 0x02 |
| 79 | #define IGMP_LAZY_MEMBER 0x03 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 80 | #define IGMP_SLEEPING_MEMBER 0x04 |
| 81 | #define IGMP_AWAKENING_MEMBER 0x05 |
| 82 | #define IGMP_MINLEN 8 |
| 83 | #define IGMP_MAX_HOST_REPORT_DELAY 10 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 84 | #define IGMP_TIMER_SCALE 10 |
| 85 | #define IGMP_AGE_THRESHOLD 400 |
| 86 | #define IGMP_ALL_HOSTS htonl(0xE0000001L) |
| 87 | #define IGMP_ALL_ROUTER htonl(0xE0000002L) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 88 | #define IGMPV3_ALL_MCR htonl(0xE0000016L) |
| 89 | #define IGMP_LOCAL_GROUP htonl(0xE0000000L) |
| 90 | #define IGMP_LOCAL_GROUP_MASK htonl(0xFFFFFF00L) |
| 91 | #endif |