Page MenuHomeFreeBSD

D53739.id166372.diff
No OneTemporary

D53739.id166372.diff

diff --git a/sys/netinet/ip_ecn.h b/sys/netinet/ip_ecn.h
--- a/sys/netinet/ip_ecn.h
+++ b/sys/netinet/ip_ecn.h
@@ -50,6 +50,6 @@
#define ECN_WARN 2 /* caller MAY log */
#define ECN_ALARM 3 /* caller SHOULD log and MAY raise alarm */
-extern void ip_ecn_ingress(int, u_int8_t *, const u_int8_t *);
-extern int ip_ecn_egress(int, const u_int8_t *, u_int8_t *);
+extern void ip_ecn_ingress(int, uint8_t *, const uint8_t *);
+extern int ip_ecn_egress(int, const uint8_t *, uint8_t *);
#endif
diff --git a/sys/netinet/ip_ecn.c b/sys/netinet/ip_ecn.c
--- a/sys/netinet/ip_ecn.c
+++ b/sys/netinet/ip_ecn.c
@@ -112,7 +112,7 @@
* modify outer ECN (TOS) field on ingress operation (tunnel encapsulation).
*/
void
-ip_ecn_ingress(int mode, u_int8_t *outer, const u_int8_t *inner)
+ip_ecn_ingress(int mode, uint8_t *outer, const uint8_t *inner)
{
if (!outer || !inner)
@@ -140,7 +140,7 @@
* the caller should drop the packet if the return value is 0.
*/
int
-ip_ecn_egress(int mode, const u_int8_t *outer, u_int8_t *inner)
+ip_ecn_egress(int mode, const uint8_t *outer, uint8_t *inner)
{
if (!outer || !inner)
@@ -198,9 +198,9 @@
#ifdef INET6
void
-ip6_ecn_ingress(int mode, u_int32_t *outer, const u_int32_t *inner)
+ip6_ecn_ingress(int mode, uint32_t *outer, const uint32_t *inner)
{
- u_int8_t outer8, inner8;
+ uint8_t outer8, inner8;
if (!outer || !inner)
panic("NULL pointer passed to ip6_ecn_ingress");
@@ -208,13 +208,13 @@
inner8 = (ntohl(*inner) >> IPV6_FLOWLABEL_LEN) & 0xff;
ip_ecn_ingress(mode, &outer8, &inner8);
*outer &= ~htonl(0xff << IPV6_FLOWLABEL_LEN);
- *outer |= htonl((u_int32_t)outer8 << IPV6_FLOWLABEL_LEN);
+ *outer |= htonl((uint32_t)outer8 << IPV6_FLOWLABEL_LEN);
}
int
-ip6_ecn_egress(int mode, const u_int32_t *outer, u_int32_t *inner)
+ip6_ecn_egress(int mode, const uint32_t *outer, uint32_t *inner)
{
- u_int8_t outer8, inner8, oinner8;
+ uint8_t outer8, inner8, oinner8;
int ret;
if (!outer || !inner)
@@ -228,7 +228,7 @@
return (ECN_DROP);
if (inner8 != oinner8) {
*inner &= ~htonl(0xff << IPV6_FLOWLABEL_LEN);
- *inner |= htonl((u_int32_t)inner8 << IPV6_FLOWLABEL_LEN);
+ *inner |= htonl((uint32_t)inner8 << IPV6_FLOWLABEL_LEN);
}
return (ret);
}
diff --git a/sys/netinet6/ip6_ecn.h b/sys/netinet6/ip6_ecn.h
--- a/sys/netinet6/ip6_ecn.h
+++ b/sys/netinet6/ip6_ecn.h
@@ -32,6 +32,6 @@
*/
#ifdef _KERNEL
-extern void ip6_ecn_ingress(int, u_int32_t *, const u_int32_t *);
-extern int ip6_ecn_egress(int, const u_int32_t *, u_int32_t *);
+extern void ip6_ecn_ingress(int, uint32_t *, const uint32_t *);
+extern int ip6_ecn_egress(int, const uint32_t *, uint32_t *);
#endif

File Metadata

Mime Type
text/plain
Expires
Mon, May 18, 11:52 PM (14 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33277492
Default Alt Text
D53739.id166372.diff (2 KB)

Event Timeline