diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-09-29 03:23:44 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-09-29 03:23:44 +0000 |
commit | 17d77e934622c40b38b3ea7e9d9486bf6c67f15f (patch) | |
tree | 091b8f79b7b11be3575beb9da2c81c7da171d9cf /sys/netinet/ip_input.c | |
parent | 420d4edc40d7c01a1b518636ee82a20d85ad87fc (diff) | |
download | FreeBSD-src-17d77e934622c40b38b3ea7e9d9486bf6c67f15f.zip FreeBSD-src-17d77e934622c40b38b3ea7e9d9486bf6c67f15f.tar.gz |
Centralize satosin(), sintosa() and ifatoia() macros in <netinet/in.h>
Remove local definitions.
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 9c0615b..0f391f1 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -558,7 +558,6 @@ pass: (ip_fw_fwd_addr == NULL); TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { -#define satosin(sa) ((struct sockaddr_in *)(sa)) #ifdef BOOTP_COMPAT if (IA_SIN(ia)->sin_addr.s_addr == INADDR_ANY) @@ -1428,7 +1427,7 @@ ip_rtaddr(dst) } if (ipforward_rt.ro_rt == 0) return ((struct in_ifaddr *)0); - return ((struct in_ifaddr *) ipforward_rt.ro_rt->rt_ifa); + return (ifatoia(ipforward_rt.ro_rt->rt_ifa)); } /* @@ -1653,7 +1652,6 @@ ip_forward(m, srcrt) * Also, don't send redirect if forwarding using a default route * or a route modified by a redirect. */ -#define satosin(sa) ((struct sockaddr_in *)(sa)) if (rt->rt_ifp == m->m_pkthdr.rcvif && (rt->rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) == 0 && satosin(rt_key(rt))->sin_addr.s_addr != 0 && |