1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-30 08:19:09 +00:00

carp: replace caddr_t with char *

Change the remaining caddr_t usages to char * following the removal
of the KAME macros

No functional change.

Requested by:	glebius
Reviewed by:	glebius
MFC after:	2 weeks
Sponsored by:	Netflix (originally)
Differential Revision:	https://reviews.freebsd.org/D22399
This commit is contained in:
Bjoern A. Zeeb 2019-12-06 16:35:48 +00:00
parent 173c062a56
commit dad68fc301
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355449
2 changed files with 8 additions and 5 deletions

View File

@ -575,7 +575,7 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
return (IPPROTO_DONE);
}
}
ch = (struct carp_header *)(mtod(m, caddr_t) + *offp);
ch = (struct carp_header *)(mtod(m, char *) + *offp);
/* verify the CARP checksum */
@ -978,6 +978,7 @@ carp_send_ad_locked(struct carp_softc *sc)
#endif /* INET */
#ifdef INET6
if (sc->sc_naddrs6) {
struct epoch_tracker et;
struct ip6_hdr *ip6;
m = m_gethdr(M_NOWAIT, MT_DATA);
@ -1031,8 +1032,10 @@ carp_send_ad_locked(struct carp_softc *sc)
CARPSTATS_INC(carps_opackets6);
NET_EPOCH_ENTER(et);
carp_send_ad_error(sc, ip6_output(m, NULL, NULL, 0,
&sc->sc_carpdev->if_carp->cif_im6o, NULL, NULL));
NET_EPOCH_EXIT(et);
}
#endif /* INET6 */
@ -1190,7 +1193,7 @@ carp_iamatch6(struct ifnet *ifp, struct in6_addr *taddr)
return (ifa);
}
caddr_t
char *
carp_macmatch6(struct ifnet *ifp, struct mbuf *m, const struct in6_addr *taddr)
{
struct ifaddr *ifa;
@ -1847,7 +1850,7 @@ carp_ioctl(struct ifreq *ifr, u_long cmd, struct thread *td)
carp_carprcp(&carpr, sc, priveleged);
carpr.carpr_count = count;
error = copyout(&carpr,
(caddr_t)ifr_data_get_ptr(ifr) +
(char *)ifr_data_get_ptr(ifr) +
(i * sizeof(carpr)), sizeof(carpr));
if (error) {
CIF_UNLOCK(ifp->if_carp);

View File

@ -149,7 +149,7 @@ int carp_output (struct ifnet *, struct mbuf *,
int carp_master(struct ifaddr *);
int carp_iamatch(struct ifaddr *, uint8_t **);
struct ifaddr *carp_iamatch6(struct ifnet *, struct in6_addr *);
caddr_t carp_macmatch6(struct ifnet *, struct mbuf *, const struct in6_addr *);
char * carp_macmatch6(struct ifnet *, struct mbuf *, const struct in6_addr *);
int carp_forus(struct ifnet *, u_char *);
/* These are external networking stack hooks for CARP */
@ -174,7 +174,7 @@ extern int (*carp_iamatch_p)(struct ifaddr *, uint8_t **);
#ifdef INET6
/* netinet6/nd6_nbr.c */
extern struct ifaddr *(*carp_iamatch6_p)(struct ifnet *, struct in6_addr *);
extern caddr_t (*carp_macmatch6_p)(struct ifnet *, struct mbuf *,
extern char * (*carp_macmatch6_p)(struct ifnet *, struct mbuf *,
const struct in6_addr *);
#endif
#endif