Skip to content

Commit 133a789

Browse files
committed
add missing define LOGIN_NAME_MAX for BSDs
move struct igmpv3 to os-linux header because BSDs have it already defined in netinet/igmp.h
1 parent 4fdc2e5 commit 133a789

6 files changed

Lines changed: 31 additions & 15 deletions

File tree

src/igmpv3.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,6 @@
2121
* igmpv3.h - Header file for common IGMPv3 includes.
2222
*/
2323

24-
/*
25-
* IGMP v3 query format.
26-
*/
27-
struct igmpv3 {
28-
u_int8_t igmp_type; /* version & type of IGMP message */
29-
u_int8_t igmp_code; /* subtype for routing msgs */
30-
u_int16_t igmp_cksum; /* IP-style checksum */
31-
struct in_addr igmp_group; /* group address being reported */
32-
/* (zero for queries) */
33-
u_int8_t igmp_misc; /* reserved/suppress/robustness */
34-
u_int8_t igmp_qqi; /* querier's query interval */
35-
u_int16_t igmp_numsrc; /* number of sources */
36-
/*struct in_addr igmp_sources[1];*/ /* source addresses */
37-
};
38-
3924
struct igmpv3_grec {
4025
u_int8_t grec_type;
4126
u_int8_t grec_auxwords;

src/os-dragonfly.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
#define INADDR_ALLIGMPV3_GROUP ((in_addr_t) 0xe0000016)
99

10+
#ifndef LOGIN_NAME_MAX
11+
#define LOGIN_NAME_MAX 256
12+
#endif
13+
1014
static inline unsigned short ip_data_len(const struct ip *ip)
1115
{
1216
return ip->ip_len;

src/os-freebsd.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
#define INADDR_ALLIGMPV3_GROUP ((in_addr_t) 0xe0000016)
2121

22+
#ifndef LOGIN_NAME_MAX
23+
#define LOGIN_NAME_MAX 256
24+
#endif
25+
2226
static inline unsigned short ip_data_len(const struct ip *ip)
2327
{
2428
#if __FreeBSD_version >= 1100030

src/os-linux.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,18 @@ static inline void ip_set_len(struct ip *ip, unsigned short len)
2121
{
2222
ip->ip_len = htons(len);
2323
}
24+
25+
/*
26+
* IGMP v3 query format.
27+
*/
28+
struct igmpv3 {
29+
u_int8_t igmp_type; /* version & type of IGMP message */
30+
u_int8_t igmp_code; /* subtype for routing msgs */
31+
u_int16_t igmp_cksum; /* IP-style checksum */
32+
struct in_addr igmp_group; /* group address being reported */
33+
/* (zero for queries) */
34+
u_int8_t igmp_misc; /* reserved/suppress/robustness */
35+
u_int8_t igmp_qqi; /* querier's query interval */
36+
u_int16_t igmp_numsrc; /* number of sources */
37+
/*struct in_addr igmp_sources[1];*/ /* source addresses */
38+
};

src/os-netbsd.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
#define INADDR_ALLIGMPV3_GROUP ((in_addr_t) 0xe0000016)
1313

14+
#ifndef LOGIN_NAME_MAX
15+
#define LOGIN_NAME_MAX 256
16+
#endif
17+
1418
static inline unsigned short ip_data_len(const struct ip *ip)
1519
{
1620
return ip->ip_len;

src/os-openbsd.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
#define INADDR_ALLRTRS_GROUP INADDR_ALLROUTERS_GROUP
1313
#define INADDR_ALLIGMPV3_GROUP ((in_addr_t) 0xe0000016)
1414

15+
#ifndef LOGIN_NAME_MAX
16+
#define LOGIN_NAME_MAX 256
17+
#endif
18+
1519
static inline unsigned short ip_data_len(const struct ip *ip)
1620
{
1721
return ntohs(ip->ip_len) - (ip->ip_hl << 2);

0 commit comments

Comments
 (0)