FreeBSD kernel IPv4 code
in_var.h File Reference
#include <sys/queue.h>
#include <sys/fnv_hash.h>
#include <sys/tree.h>
#include <netinet6/in6_var.h>
Include dependency graph for in_var.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  in_aliasreq
 
struct  in_ifinfo
 
struct  in_ifaddr
 
struct  router_info
 
struct  ip_msource
 
struct  ip_msource::ims_st
 
struct  in_msource
 
struct  in_mfilter
 
struct  in_multi
 
struct  in_multi::inm_st
 

Macros

#define ifra_dstaddr   ifra_broadaddr
 
#define ia_ifp   ia_ifa.ifa_ifp
 
#define ia_flags   ia_ifa.ifa_flags
 
#define ia_broadaddr   ia_dstaddr
 
#define IA_SIN(ia)   (&(((struct in_ifaddr *)(ia))->ia_addr))
 
#define IA_DSTSIN(ia)   (&(((struct in_ifaddr *)(ia))->ia_dstaddr))
 
#define IA_MASKSIN(ia)   (&(((struct in_ifaddr *)(ia))->ia_sockmask))
 
#define IN_LNAOF(in, ifa)    ((ntohl((in).s_addr) & ~((struct in_ifaddr *)(ifa)->ia_subnetmask))
 
#define LLTABLE(ifp)    ((struct in_ifinfo *)(ifp)->if_afdata[AF_INET])->ii_llt
 
#define V_in_ifaddrhashtbl   VNET(in_ifaddrhashtbl)
 
#define V_in_ifaddrhead   VNET(in_ifaddrhead)
 
#define V_in_ifaddrhmask   VNET(in_ifaddrhmask)
 
#define INADDR_NHASH_LOG2   9
 
#define INADDR_NHASH   (1 << INADDR_NHASH_LOG2)
 
#define INADDR_HASHVAL(x)   fnv_32_buf((&(x)), sizeof(x), FNV1_32_INIT)
 
#define INADDR_HASH(x)    (&V_in_ifaddrhashtbl[INADDR_HASHVAL(x) & V_in_ifaddrhmask])
 
#define INADDR_TO_IFADDR(addr, ia)
 
#define INADDR_TO_IFP(addr, ifp)
 
#define IFP_TO_IA(ifp, ia)
 
#define IP_MFILTER_FOREACH(imf, head)    STAILQ_FOREACH(imf, head, imf_entry)
 
#define IN_MULTI_LIST_LOCK()   mtx_lock(&in_multi_list_mtx)
 
#define IN_MULTI_LIST_UNLOCK()   mtx_unlock(&in_multi_list_mtx)
 
#define IN_MULTI_LIST_LOCK_ASSERT()   mtx_assert(&in_multi_list_mtx, MA_OWNED)
 
#define IN_MULTI_LIST_UNLOCK_ASSERT()   mtx_assert(&in_multi_list_mtx, MA_NOTOWNED)
 
#define IN_MULTI_LOCK()   sx_xlock(&in_multi_sx)
 
#define IN_MULTI_UNLOCK()   sx_xunlock(&in_multi_sx)
 
#define IN_MULTI_LOCK_ASSERT()   sx_assert(&in_multi_sx, SA_XLOCKED)
 
#define IN_MULTI_UNLOCK_ASSERT()   sx_assert(&in_multi_sx, SA_XUNLOCKED)
 
#define MCAST_PASS   0 /* Pass */
 
#define MCAST_NOTGMEMBER   1 /* This host not a member of group */
 
#define MCAST_NOTSMEMBER   2 /* This host excluded source */
 
#define MCAST_MUTED   3 /* [deprecated] */
 

Functions

 SLIST_HEAD (in_multi_head, in_multi)
 
 CK_STAILQ_HEAD (in_ifaddrhead, in_ifaddr)
 
 CK_LIST_HEAD (in_ifaddrhashhead, in_ifaddr)
 
 VNET_DECLARE (struct in_ifaddrhashhead *, in_ifaddrhashtbl)
 
 VNET_DECLARE (struct in_ifaddrhead, in_ifaddrhead)
 
 VNET_DECLARE (u_long, in_ifaddrhmask)
 
 RB_HEAD (ip_msource_tree, ip_msource)
 
static __inline int ip_msource_cmp (const struct ip_msource *a, const struct ip_msource *b)
 
 RB_PROTOTYPE (ip_msource_tree, ip_msource, ims_link, ip_msource_cmp)
 
 STAILQ_HEAD (ip_mfilter_head, in_mfilter)
 
struct in_mfilterip_mfilter_alloc (int mflags, int st0, int st1)
 
void ip_mfilter_free (struct in_mfilter *)
 
static void ip_mfilter_init (struct ip_mfilter_head *head)
 
static struct in_mfilterip_mfilter_first (const struct ip_mfilter_head *head)
 
static void ip_mfilter_insert (struct ip_mfilter_head *head, struct in_mfilter *imf)
 
static void ip_mfilter_remove (struct ip_mfilter_head *head, struct in_mfilter *imf)
 
static size_t ip_mfilter_count (struct ip_mfilter_head *head)
 
static __inline uint8_t ims_get_mode (const struct in_multi *inm, const struct ip_msource *ims, uint8_t t)
 
void inm_disconnect (struct in_multi *inm)
 
static __inline void inm_acquire_locked (struct in_multi *inm)
 
static __inline void inm_acquire (struct in_multi *inm)
 
static __inline void inm_rele_locked (struct in_multi_head *inmh, struct in_multi *inm)
 
struct in_multiinm_lookup_locked (struct ifnet *, const struct in_addr)
 
struct in_multiinm_lookup (struct ifnet *, const struct in_addr)
 
int imo_multi_filter (const struct ip_moptions *, const struct ifnet *, const struct sockaddr *, const struct sockaddr *)
 
void inm_commit (struct in_multi *)
 
void inm_clear_recorded (struct in_multi *)
 
void inm_print (const struct in_multi *)
 
int inm_record_source (struct in_multi *inm, const in_addr_t)
 
void inm_release_deferred (struct in_multi *)
 
void inm_release_list_deferred (struct in_multi_head *)
 
void inm_release_wait (void *)
 
int in_joingroup (struct ifnet *, const struct in_addr *, struct in_mfilter *, struct in_multi **)
 
int in_joingroup_locked (struct ifnet *, const struct in_addr *, struct in_mfilter *, struct in_multi **)
 
int in_leavegroup (struct in_multi *, struct in_mfilter *)
 
int in_leavegroup_locked (struct in_multi *, struct in_mfilter *)
 
int in_control (struct socket *, u_long, caddr_t, struct ifnet *, struct thread *)
 
int in_addprefix (struct in_ifaddr *)
 
int in_scrubprefix (struct in_ifaddr *, u_int)
 
void in_ifscrub_all (void)
 
int in_handle_ifaddr_route (int, struct in_ifaddr *)
 
void ip_input (struct mbuf *)
 
void ip_direct_input (struct mbuf *)
 
void in_ifadown (struct ifaddr *ifa, int)
 
struct mbuf * ip_tryforward (struct mbuf *)
 
void * in_domifattach (struct ifnet *)
 
void in_domifdetach (struct ifnet *, void *)
 
struct rib_head * in_inithead (uint32_t fibnum)
 

Variables

u_char inetctlerrmap []
 
struct mtx in_multi_list_mtx
 
struct sx in_multi_sx
 
int ifma_restart
 

Macro Definition Documentation

◆ ia_broadaddr

#define ia_broadaddr   ia_dstaddr

Definition at line 86 of file in_var.h.

◆ IA_DSTSIN

#define IA_DSTSIN (   ia)    (&(((struct in_ifaddr *)(ia))->ia_dstaddr))

Definition at line 97 of file in_var.h.

◆ ia_flags

#define ia_flags   ia_ifa.ifa_flags

Definition at line 78 of file in_var.h.

◆ ia_ifp

#define ia_ifp   ia_ifa.ifa_ifp

Definition at line 77 of file in_var.h.

◆ IA_MASKSIN

#define IA_MASKSIN (   ia)    (&(((struct in_ifaddr *)(ia))->ia_sockmask))

Definition at line 98 of file in_var.h.

◆ IA_SIN

#define IA_SIN (   ia)    (&(((struct in_ifaddr *)(ia))->ia_addr))

Definition at line 96 of file in_var.h.

◆ IFP_TO_IA

#define IFP_TO_IA (   ifp,
  ia 
)
Value:
/* struct ifnet *ifp; */ \
/* struct in_ifaddr *ia; */ \
do { \
NET_EPOCH_ASSERT(); \
for ((ia) = CK_STAILQ_FIRST(&V_in_ifaddrhead); \
(ia) != NULL && (ia)->ia_ifp != (ifp); \
(ia) = CK_STAILQ_NEXT((ia), ia_link)) \
continue; \
} while (0)
#define V_in_ifaddrhead
Definition: in_var.h:118

Definition at line 159 of file in_var.h.

◆ ifra_dstaddr

#define ifra_dstaddr   ifra_broadaddr

Definition at line 45 of file in_var.h.

◆ IN_LNAOF

#define IN_LNAOF (   in,
  ifa 
)     ((ntohl((in).s_addr) & ~((struct in_ifaddr *)(ifa)->ia_subnetmask))

Definition at line 100 of file in_var.h.

◆ IN_MULTI_LIST_LOCK

#define IN_MULTI_LIST_LOCK ( )    mtx_lock(&in_multi_list_mtx)

Definition at line 374 of file in_var.h.

◆ IN_MULTI_LIST_LOCK_ASSERT

#define IN_MULTI_LIST_LOCK_ASSERT ( )    mtx_assert(&in_multi_list_mtx, MA_OWNED)

Definition at line 376 of file in_var.h.

◆ IN_MULTI_LIST_UNLOCK

#define IN_MULTI_LIST_UNLOCK ( )    mtx_unlock(&in_multi_list_mtx)

Definition at line 375 of file in_var.h.

◆ IN_MULTI_LIST_UNLOCK_ASSERT

#define IN_MULTI_LIST_UNLOCK_ASSERT ( )    mtx_assert(&in_multi_list_mtx, MA_NOTOWNED)

Definition at line 377 of file in_var.h.

◆ IN_MULTI_LOCK

#define IN_MULTI_LOCK ( )    sx_xlock(&in_multi_sx)

Definition at line 379 of file in_var.h.

◆ IN_MULTI_LOCK_ASSERT

#define IN_MULTI_LOCK_ASSERT ( )    sx_assert(&in_multi_sx, SA_XLOCKED)

Definition at line 381 of file in_var.h.

◆ IN_MULTI_UNLOCK

#define IN_MULTI_UNLOCK ( )    sx_xunlock(&in_multi_sx)

Definition at line 380 of file in_var.h.

◆ IN_MULTI_UNLOCK_ASSERT

#define IN_MULTI_UNLOCK_ASSERT ( )    sx_assert(&in_multi_sx, SA_XUNLOCKED)

Definition at line 382 of file in_var.h.

◆ INADDR_HASH

#define INADDR_HASH (   x)     (&V_in_ifaddrhashtbl[INADDR_HASHVAL(x) & V_in_ifaddrhmask])

Definition at line 124 of file in_var.h.

◆ INADDR_HASHVAL

#define INADDR_HASHVAL (   x)    fnv_32_buf((&(x)), sizeof(x), FNV1_32_INIT)

Definition at line 123 of file in_var.h.

◆ INADDR_NHASH

#define INADDR_NHASH   (1 << INADDR_NHASH_LOG2)

Definition at line 122 of file in_var.h.

◆ INADDR_NHASH_LOG2

#define INADDR_NHASH_LOG2   9

Definition at line 121 of file in_var.h.

◆ INADDR_TO_IFADDR

#define INADDR_TO_IFADDR (   addr,
  ia 
)
Value:
/* struct in_addr addr; */ \
/* struct in_ifaddr *ia; */ \
do { \
NET_EPOCH_ASSERT(); \
CK_LIST_FOREACH(ia, INADDR_HASH((addr).s_addr), ia_hash) \
if (IA_SIN(ia)->sin_addr.s_addr == (addr).s_addr) \
break; \
} while (0)
#define IA_SIN(ia)
Definition: in_var.h:96
#define INADDR_HASH(x)
Definition: in_var.h:124
union @45::@47 s_addr

Definition at line 131 of file in_var.h.

◆ INADDR_TO_IFP

#define INADDR_TO_IFP (   addr,
  ifp 
)
Value:
/* struct in_addr addr; */ \
/* struct ifnet *ifp; */ \
{ \
struct in_ifaddr *ia; \
INADDR_TO_IFADDR(addr, ia); \
(ifp) = (ia == NULL) ? NULL : ia->ia_ifp; \
}
#define INADDR_TO_IFADDR(addr, ia)
Definition: in_var.h:131

Definition at line 145 of file in_var.h.

◆ IP_MFILTER_FOREACH

#define IP_MFILTER_FOREACH (   imf,
  head 
)     STAILQ_FOREACH(imf, head, imf_entry)

Definition at line 263 of file in_var.h.

◆ LLTABLE

#define LLTABLE (   ifp)     ((struct in_ifinfo *)(ifp)->if_afdata[AF_INET])->ii_llt

Definition at line 105 of file in_var.h.

◆ MCAST_MUTED

#define MCAST_MUTED   3 /* [deprecated] */

Definition at line 424 of file in_var.h.

◆ MCAST_NOTGMEMBER

#define MCAST_NOTGMEMBER   1 /* This host not a member of group */

Definition at line 422 of file in_var.h.

◆ MCAST_NOTSMEMBER

#define MCAST_NOTSMEMBER   2 /* This host excluded source */

Definition at line 423 of file in_var.h.

◆ MCAST_PASS

#define MCAST_PASS   0 /* Pass */

Definition at line 421 of file in_var.h.

◆ V_in_ifaddrhashtbl

#define V_in_ifaddrhashtbl   VNET(in_ifaddrhashtbl)

Definition at line 117 of file in_var.h.

◆ V_in_ifaddrhead

#define V_in_ifaddrhead   VNET(in_ifaddrhead)

Definition at line 118 of file in_var.h.

◆ V_in_ifaddrhmask

#define V_in_ifaddrhmask   VNET(in_ifaddrhmask)

Definition at line 119 of file in_var.h.

Function Documentation

◆ CK_LIST_HEAD()

CK_LIST_HEAD ( in_ifaddrhashhead  ,
in_ifaddr   
)

◆ CK_STAILQ_HEAD()

CK_STAILQ_HEAD ( in_ifaddrhead  ,
in_ifaddr   
)

◆ imo_multi_filter()

int imo_multi_filter ( const struct ip_moptions *  imo,
const struct ifnet *  ifp,
const struct sockaddr *  group,
const struct sockaddr *  src 
)

Definition at line 462 of file in_mcast.c.

References in_mfilter::imf_st, imo_match_group(), imo_match_source(), in_msource::imsl_st, MCAST_NOTGMEMBER, MCAST_NOTSMEMBER, and MCAST_PASS.

Here is the call graph for this function:

◆ ims_get_mode()

static __inline uint8_t ims_get_mode ( const struct in_multi inm,
const struct ip_msource ims,
uint8_t  t 
)
static

◆ in_addprefix()

int in_addprefix ( struct in_ifaddr target)

Definition at line 992 of file in.c.

References in_ifaddr::ia_ifa, in_handle_ifaddr_route(), in_hasrtprefix(), and V_nosameprefix.

Referenced by carp_ifa_addroute(), and in_aifaddr_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ in_control()

int in_control ( struct socket *  so,
u_long  cmd,
caddr_t  data,
struct ifnet *  ifp,
struct thread *  td 
)

Definition at line 281 of file in.c.

References in_aifaddr_ioctl(), in_control_sx, in_difaddr_ioctl(), in_gifaddr_ioctl(), INADDR_ANY, prison_check_ip4(), in_addr::s_addr, and sockaddr_in::sin_addr.

Referenced by in_ifscrub_all().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ in_domifattach()

void * in_domifattach ( struct ifnet *  ifp)

Definition at line 1719 of file in.c.

References igmp_domifattach(), in_ifinfo::ii_igmp, in_ifinfo::ii_llt, and in_lltattach().

Here is the call graph for this function:

◆ in_domifdetach()

void in_domifdetach ( struct ifnet *  ifp,
void *  aux 
)

Definition at line 1732 of file in.c.

References igmp_domifdetach(), and in_ifinfo::ii_llt.

Here is the call graph for this function:

◆ in_handle_ifaddr_route()

int in_handle_ifaddr_route ( int  cmd,
struct in_ifaddr ia 
)

Definition at line 912 of file in.c.

References ia_getrtprefix(), in_ifaddr::ia_ifa, in_handle_prefix_route(), INADDR_BROADCAST, in_addr::s_addr, s_addr, sockaddr_in::sin_addr, and sockaddr_in::sin_family.

Referenced by in_addprefix(), and in_scrubprefix().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ in_ifadown()

void in_ifadown ( struct ifaddr *  ifa,
int  delete 
)

Definition at line 171 of file in_rmx.c.

References in_ifadown_arg::del, in_ifadown_arg::ifa, and in_ifadownkill().

Referenced by in_difaddr_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ in_ifscrub_all()

void in_ifscrub_all ( void  )

Definition at line 1158 of file in.c.

References igmp_domifdetach(), in_control(), and in_purgemaddrs().

Here is the call graph for this function:

◆ in_inithead()

struct rib_head * in_inithead ( uint32_t  fibnum)

Definition at line 119 of file in_rmx.c.

References rib4_preadd().

Here is the call graph for this function:

◆ in_joingroup()

int in_joingroup ( struct ifnet *  ifp,
const struct in_addr gina,
struct in_mfilter imf,
struct in_multi **  pinm 
)

Definition at line 1201 of file in_mcast.c.

References in_joingroup_locked(), IN_MULTI_LOCK, and IN_MULTI_UNLOCK.

Referenced by carp_multicast_setup(), and in_aifaddr_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ in_joingroup_locked()

int in_joingroup_locked ( struct ifnet *  ifp,
const struct in_addr gina,
struct in_mfilter imf,
struct in_multi **  pinm 
)

Definition at line 1223 of file in_mcast.c.

References igmp_change_state(), imf_init(), in_getmulti(), IN_MULTI_LIST_LOCK, IN_MULTI_LIST_UNLOCK, IN_MULTI_LIST_UNLOCK_ASSERT, IN_MULTI_LOCK_ASSERT, inm_merge(), inm_release_deferred(), KTR_IGMPV3, and in_addr::s_addr.

Referenced by in_joingroup(), and inp_join_group().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ in_leavegroup()

int in_leavegroup ( struct in_multi inm,
struct in_mfilter imf 
)

Definition at line 1286 of file in_mcast.c.

References in_leavegroup_locked(), IN_MULTI_LOCK, and IN_MULTI_UNLOCK.

Referenced by carp_multicast_cleanup(), in_difaddr_ioctl(), and inp_freemoptions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ in_leavegroup_locked()

int in_leavegroup_locked ( struct in_multi inm,
struct in_mfilter imf 
)

Definition at line 1311 of file in_mcast.c.

References igmp_change_state(), imf_init(), IN_MULTI_LIST_LOCK, IN_MULTI_LIST_UNLOCK, IN_MULTI_LIST_UNLOCK_ASSERT, IN_MULTI_LOCK_ASSERT, in_multi::inm_addr, in_multi::inm_ifp, inm_merge(), inm_release_deferred(), KTR_IGMPV3, and in_addr::s_addr.

Referenced by in_leavegroup(), and inp_leave_group().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ in_scrubprefix()

int in_scrubprefix ( struct in_ifaddr target,
u_int  flags 
)

Definition at line 1060 of file in.c.

References in_ifaddr::ia_addr, ia_getrtprefix(), in_ifaddr::ia_ifa, ia_need_loopback_route(), in_handle_ifaddr_route(), in_localip_more(), in_scrubprefixlle(), in_addr::s_addr, and V_in_ifaddrhead.

Referenced by carp_ifa_delroute(), in_aifaddr_ioctl(), and in_difaddr_ioctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inm_acquire()

static __inline void inm_acquire ( struct in_multi inm)
static

Definition at line 397 of file in_var.h.

References IN_MULTI_LIST_LOCK, IN_MULTI_LIST_UNLOCK, and inm_acquire_locked().

Here is the call graph for this function:

◆ inm_acquire_locked()

static __inline void inm_acquire_locked ( struct in_multi inm)
static

Definition at line 389 of file in_var.h.

References IN_MULTI_LIST_LOCK_ASSERT, and in_multi::inm_refcount.

Referenced by igmp_final_leave(), in_getmulti(), and inm_acquire().

Here is the caller graph for this function:

◆ inm_clear_recorded()

void inm_clear_recorded ( struct in_multi inm)

◆ inm_commit()

void inm_commit ( struct in_multi inm)

Definition at line 1143 of file in_mcast.c.

References ip_msource::ims_st, inm_print(), in_multi::inm_srcs, in_multi::inm_st, and KTR_IGMPV3.

Referenced by igmp_final_leave(), igmp_handle_state_change(), igmp_initial_join(), and igmp_v3_process_group_timers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inm_disconnect()

void inm_disconnect ( struct in_multi inm)

Definition at line 258 of file in_mcast.c.

References ifma_restart, in_multi::inm_ifma, and in_multi::inm_ifp.

Referenced by inm_rele_locked(), and inm_release_deferred().

Here is the caller graph for this function:

◆ inm_lookup()

struct in_multi * inm_lookup ( struct ifnet *  ifp,
const struct in_addr  ina 
)

Definition at line 390 of file in_mcast.c.

References IN_MULTI_LIST_LOCK_ASSERT, and inm_lookup_locked().

Referenced by igmp_input_v1_report(), igmp_input_v2_query(), igmp_input_v2_report(), igmp_input_v3_query(), and in_getmulti().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inm_lookup_locked()

struct in_multi * inm_lookup_locked ( struct ifnet *  ifp,
const struct in_addr  ina 
)

Definition at line 364 of file in_mcast.c.

References IN_MULTI_LIST_LOCK_ASSERT, in_multi::inm_addr, and in_addr::s_addr.

Referenced by inm_lookup().

Here is the caller graph for this function:

◆ inm_print()

void inm_print ( const struct in_multi inm)

Definition at line 3033 of file in_mcast.c.

Referenced by inm_commit(), and inm_merge().

Here is the caller graph for this function:

◆ inm_record_source()

int inm_record_source ( struct in_multi inm,
const  in_addr_t 
)

◆ inm_rele_locked()

static __inline void inm_rele_locked ( struct in_multi_head *  inmh,
struct in_multi inm 
)
static

Definition at line 405 of file in_var.h.

References IN_MULTI_LIST_LOCK_ASSERT, inm_disconnect(), in_multi::inm_ifma, and in_multi::inm_refcount.

Referenced by igmp_ifdetach(), igmp_initial_join(), igmp_v3_cancel_link_timers(), igmp_v3_process_group_timers(), and in_purgemaddrs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inm_release_deferred()

void inm_release_deferred ( struct in_multi inm)

Definition at line 291 of file in_mcast.c.

References IN_MULTI_LIST_LOCK_ASSERT, inm_disconnect(), in_multi::inm_ifma, in_multi::inm_refcount, and inm_release_list_deferred().

Referenced by in_joingroup_locked(), in_leavegroup_locked(), and inp_join_group().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inm_release_list_deferred()

void inm_release_list_deferred ( struct in_multi_head *  inmh)

Definition at line 246 of file in_mcast.c.

References in_multi_free_mtx, inm_free_list, and inm_free_task.

Referenced by igmp_fasttimo_vnet(), igmp_ifdetach(), igmp_v3_cancel_link_timers(), in_purgemaddrs(), and inm_release_deferred().

Here is the caller graph for this function:

◆ inm_release_wait()

void inm_release_wait ( void *  )

◆ ip_direct_input()

void ip_direct_input ( struct mbuf *  )

◆ ip_input()

◆ ip_mfilter_alloc()

struct in_mfilter * ip_mfilter_alloc ( int  mflags,
int  st0,
int  st1 
)

Definition at line 339 of file in_mcast.c.

References imf_init().

Referenced by carp_multicast_setup(), and inp_join_group().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ip_mfilter_count()

static size_t ip_mfilter_count ( struct ip_mfilter_head *  head)
inlinestatic

Definition at line 267 of file in_var.h.

Referenced by inp_join_group().

Here is the caller graph for this function:

◆ ip_mfilter_first()

static struct in_mfilter * ip_mfilter_first ( const struct ip_mfilter_head *  head)
inlinestatic

Definition at line 243 of file in_var.h.

Referenced by carp_multicast_cleanup(), carp_multicast_setup(), and inp_freemoptions().

Here is the caller graph for this function:

◆ ip_mfilter_free()

void ip_mfilter_free ( struct in_mfilter imf)

Definition at line 351 of file in_mcast.c.

References imf_purge().

Referenced by carp_multicast_cleanup(), carp_multicast_setup(), inp_freemoptions(), inp_join_group(), and inp_leave_group().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ip_mfilter_init()

static void ip_mfilter_init ( struct ip_mfilter_head *  head)
inlinestatic

Definition at line 236 of file in_var.h.

Referenced by carp_multicast_setup().

Here is the caller graph for this function:

◆ ip_mfilter_insert()

static void ip_mfilter_insert ( struct ip_mfilter_head *  head,
struct in_mfilter imf 
)
inlinestatic

Definition at line 250 of file in_var.h.

Referenced by carp_multicast_setup(), and inp_join_group().

Here is the caller graph for this function:

◆ ip_mfilter_remove()

static void ip_mfilter_remove ( struct ip_mfilter_head *  head,
struct in_mfilter imf 
)
inlinestatic

Definition at line 257 of file in_var.h.

Referenced by carp_multicast_cleanup(), inp_freemoptions(), and inp_leave_group().

Here is the caller graph for this function:

◆ ip_msource_cmp()

static __inline int ip_msource_cmp ( const struct ip_msource a,
const struct ip_msource b 
)
static

Definition at line 205 of file in_var.h.

References ip_msource::ims_haddr.

◆ ip_tryforward()

◆ RB_HEAD()

RB_HEAD ( ip_msource_tree  ,
ip_msource   
)

◆ RB_PROTOTYPE()

RB_PROTOTYPE ( ip_msource_tree  ,
ip_msource  ,
ims_link  ,
ip_msource_cmp   
)

◆ SLIST_HEAD()

SLIST_HEAD ( in_multi_head  ,
in_multi   
)

◆ STAILQ_HEAD()

STAILQ_HEAD ( ip_mfilter_head  ,
in_mfilter   
)

◆ VNET_DECLARE() [1/3]

VNET_DECLARE ( struct in_ifaddrhashhead *  ,
in_ifaddrhashtbl   
)

◆ VNET_DECLARE() [2/3]

VNET_DECLARE ( struct in_ifaddrhead  ,
in_ifaddrhead   
)

◆ VNET_DECLARE() [3/3]

VNET_DECLARE ( u_long  ,
in_ifaddrhmask   
)

Variable Documentation

◆ ifma_restart

int ifma_restart
extern

Definition at line 116 of file in_mcast.c.

Referenced by igmp_fasttimo_vnet(), igmp_ifdetach(), in_purgemaddrs(), and inm_disconnect().

◆ in_multi_list_mtx

struct mtx in_multi_list_mtx
extern

Definition at line 107 of file in_mcast.c.

◆ in_multi_sx

struct sx in_multi_sx
extern

Definition at line 113 of file in_mcast.c.

◆ inetctlerrmap

u_char inetctlerrmap[]
extern

Definition at line 935 of file ip_input.c.