diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-01-17 15:43:53 +0400 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-02-07 15:49:08 +0200 |
commit | d7df0b41dc38327388c3f19fdf4246793d4a1e4b (patch) | |
tree | c22ae85e9673aab5ba4df10ee5c7e124f4cdac1b /slirp/ip_icmp.h | |
parent | a9d8b3ec4385793815d7121785730422fa3dfb68 (diff) |
slirp: prefer c99 types over BSD kind
Replace:
- u_char -> uint8_t
- u_short -> uint16_t
- u_long -> uint32_t
- u_int -> unsigned
- caddr_t -> char *
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/ip_icmp.h')
-rw-r--r-- | slirp/ip_icmp.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/slirp/ip_icmp.h b/slirp/ip_icmp.h index d88ab34c1b..a4e5b8b265 100644 --- a/slirp/ip_icmp.h +++ b/slirp/ip_icmp.h @@ -44,22 +44,22 @@ typedef uint32_t n_time; * Structure of an icmp header. */ struct icmp { - u_char icmp_type; /* type of message, see below */ - u_char icmp_code; /* type sub code */ - u_short icmp_cksum; /* ones complement cksum of struct */ + uint8_t icmp_type; /* type of message, see below */ + uint8_t icmp_code; /* type sub code */ + uint16_t icmp_cksum; /* ones complement cksum of struct */ union { - u_char ih_pptr; /* ICMP_PARAMPROB */ + uint8_t ih_pptr; /* ICMP_PARAMPROB */ struct in_addr ih_gwaddr; /* ICMP_REDIRECT */ struct ih_idseq { - u_short icd_id; - u_short icd_seq; + uint16_t icd_id; + uint16_t icd_seq; } ih_idseq; int ih_void; /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */ struct ih_pmtu { - u_short ipm_void; - u_short ipm_nextmtu; + uint16_t ipm_void; + uint16_t ipm_nextmtu; } ih_pmtu; } icmp_hun; #define icmp_pptr icmp_hun.ih_pptr @@ -156,7 +156,7 @@ struct icmp { void icmp_init(Slirp *slirp); void icmp_cleanup(Slirp *slirp); void icmp_input(struct mbuf *, int); -void icmp_send_error(struct mbuf *msrc, u_char type, u_char code, int minsize, +void icmp_send_error(struct mbuf *msrc, uint8_t type, uint8_t code, int minsize, const char *message); void icmp_reflect(struct mbuf *); void icmp_receive(struct socket *so); |