You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
125 lines
5.2 KiB
125 lines
5.2 KiB
Index: src/carp.c |
|
--- src/carp.c.orig 2007-07-04 17:17:12 +0200 |
|
+++ src/carp.c 2007-07-05 07:44:10 +0200 |
|
@@ -133,7 +133,7 @@ |
|
return (unsigned short) ~sum; |
|
} |
|
|
|
-static void carp_hmac_generate(struct carp_softc *sc, u_int32_t counter[2], |
|
+static void carp_hmac_generate(struct carp_softc *sc, uint32_t counter[2], |
|
unsigned char *md) |
|
{ |
|
SHA1_CTX ctx; |
|
Index: src/fillmac.c |
|
--- src/fillmac.c.orig 2007-07-04 15:34:59 +0200 |
|
+++ src/fillmac.c 2007-07-05 07:44:10 +0200 |
|
@@ -102,7 +102,7 @@ |
|
} |
|
return -1; |
|
} |
|
-#elif defined(SIOCGLIFNUM) |
|
+#elif defined(SIOCGLIFNUM) && !defined(__hpux) |
|
{ |
|
struct lifconf lifc; |
|
struct lifnum lifn; |
|
Index: src/ip_carp.h |
|
--- src/ip_carp.h.orig 2007-07-04 15:35:07 +0200 |
|
+++ src/ip_carp.h 2007-07-05 07:44:10 +0200 |
|
@@ -56,19 +56,19 @@ |
|
|
|
struct carp_header { |
|
#ifdef WORDS_BIGENDIAN |
|
- u_int8_t carp_version:4, |
|
+ uint8_t carp_version:4, |
|
carp_type:4; |
|
#else |
|
- u_int8_t carp_type:4, |
|
+ uint8_t carp_type:4, |
|
carp_version:4; |
|
#endif |
|
- u_int8_t carp_vhid; /* virtual host id */ |
|
- u_int8_t carp_advskew; /* advertisement skew */ |
|
- u_int8_t carp_authlen; /* size of counter+md, 32bit chunks */ |
|
- u_int8_t carp_pad1; /* reserved */ |
|
- u_int8_t carp_advbase; /* advertisement interval */ |
|
- u_int16_t carp_cksum; |
|
- u_int32_t carp_counter[2]; |
|
+ uint8_t carp_vhid; /* virtual host id */ |
|
+ uint8_t carp_advskew; /* advertisement skew */ |
|
+ uint8_t carp_authlen; /* size of counter+md, 32bit chunks */ |
|
+ uint8_t carp_pad1; /* reserved */ |
|
+ uint8_t carp_advbase; /* advertisement interval */ |
|
+ uint16_t carp_cksum; |
|
+ uint32_t carp_counter[2]; |
|
unsigned char carp_md[20]; /* SHA1 HMAC */ |
|
} __packed; |
|
|
|
@@ -91,24 +91,24 @@ |
|
* Statistics. |
|
*/ |
|
struct carpstats { |
|
- u_int64_t carps_ipackets; /* total input packets, IPv4 */ |
|
- u_int64_t carps_ipackets6; /* total input packets, IPv6 */ |
|
- u_int64_t carps_badif; /* wrong interface */ |
|
- u_int64_t carps_badttl; /* TTL is not CARP_DFLTTL */ |
|
- u_int64_t carps_hdrops; /* packets shorter than header */ |
|
- u_int64_t carps_badsum; /* bad checksum */ |
|
- u_int64_t carps_badver; /* bad (incl unsupp) version */ |
|
- u_int64_t carps_badlen; /* data length does not match */ |
|
- u_int64_t carps_badauth; /* bad authentication */ |
|
- u_int64_t carps_badvhid; /* bad VHID */ |
|
- u_int64_t carps_badaddrs; /* bad address list */ |
|
- |
|
- u_int64_t carps_opackets; /* total output packets, IPv4 */ |
|
- u_int64_t carps_opackets6; /* total output packets, IPv6 */ |
|
- u_int64_t carps_onomem; /* no memory for an mbuf */ |
|
- u_int64_t carps_ostates; /* total state updates sent */ |
|
+ uint64_t carps_ipackets; /* total input packets, IPv4 */ |
|
+ uint64_t carps_ipackets6; /* total input packets, IPv6 */ |
|
+ uint64_t carps_badif; /* wrong interface */ |
|
+ uint64_t carps_badttl; /* TTL is not CARP_DFLTTL */ |
|
+ uint64_t carps_hdrops; /* packets shorter than header */ |
|
+ uint64_t carps_badsum; /* bad checksum */ |
|
+ uint64_t carps_badver; /* bad (incl unsupp) version */ |
|
+ uint64_t carps_badlen; /* data length does not match */ |
|
+ uint64_t carps_badauth; /* bad authentication */ |
|
+ uint64_t carps_badvhid; /* bad VHID */ |
|
+ uint64_t carps_badaddrs; /* bad address list */ |
|
+ |
|
+ uint64_t carps_opackets; /* total output packets, IPv4 */ |
|
+ uint64_t carps_opackets6; /* total output packets, IPv6 */ |
|
+ uint64_t carps_onomem; /* no memory for an mbuf */ |
|
+ uint64_t carps_ostates; /* total state updates sent */ |
|
|
|
- u_int64_t carps_preempt; /* if enabled, preemptions */ |
|
+ uint64_t carps_preempt; /* if enabled, preemptions */ |
|
}; |
|
|
|
/* |
|
Index: src/ucarp.h |
|
--- src/ucarp.h.orig 2007-07-04 16:24:07 +0200 |
|
+++ src/ucarp.h 2007-07-05 07:46:30 +0200 |
|
@@ -63,10 +63,10 @@ |
|
#include <pcap.h> |
|
|
|
#ifdef __sun__ |
|
-# define u_int8_t uint8_t |
|
-# define u_int16_t uint16_t |
|
-# define u_int32_t uint32_t |
|
-# define u_int64_t uint64_t |
|
+# define uint8_t uint8_t |
|
+# define uint16_t uint16_t |
|
+# define uint32_t uint32_t |
|
+# define uint64_t uint64_t |
|
# define ether_shost ether_shost.ether_addr_octet |
|
# define ether_dhost ether_dhost.ether_addr_octet |
|
#endif |
|
@@ -192,7 +192,7 @@ |
|
int sc_naddrs6; |
|
int sc_advbase; /* seconds */ |
|
int sc_init_counter; |
|
- u_int64_t sc_counter; |
|
+ uint64_t sc_counter; |
|
int sc_delayed_arp; |
|
|
|
/* authentication */
|
|
|