Contiki-NG
Loading...
Searching...
No Matches
uip-mcast6-route.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011, Loughborough University - Computer Science
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * 3. Neither the name of the copyright holder nor the names of its
15 * contributors may be used to endorse or promote products derived
16 * from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29 * OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31/**
32 * \addtogroup uip-multicast
33 * @{
34 */
35/**
36 * \file
37 * Header file for multicast routing table manipulation
38 *
39 * \author
40 * George Oikonomou - <oikonomou@users.sourceforge.net>
41 */
42#ifndef UIP_MCAST6_ROUTE_H_
43#define UIP_MCAST6_ROUTE_H_
44
45#include "contiki.h"
46#include "net/ipv6/uip.h"
47
48#include <stdint.h>
49/*---------------------------------------------------------------------------*/
50/** \brief An entry in the multicast routing table */
51typedef struct uip_mcast6_route {
52 struct uip_mcast6_route *next; /**< Routes are arranged in a linked list */
53 uip_ipaddr_t group; /**< The multicast group */
54 uint32_t lifetime; /**< Entry lifetime seconds */
55 void *dag; /**< Pointer to an rpl_dag_t struct */
57/*---------------------------------------------------------------------------*/
58/** \name Multicast Routing Table Manipulation */
59/** @{ */
60
61/**
62 * \brief Lookup a multicast route
63 * \param group A pointer to the multicast group to be searched for
64 * \return A pointer to the new routing entry, or NULL if the route could not
65 * be found
66 */
68
69/**
70 * \brief Add a multicast route
71 * \param group A pointer to the multicast group to be added
72 * \return A pointer to the new route, or NULL if the route could not be added
73 */
75
76/**
77 * \brief Remove a multicast route
78 * \param route A pointer to the route to be removed
79 */
81
82/**
83 * \brief Retrieve the count of multicast routes
84 * \return The number of multicast routes
85 */
87
88/**
89 * \brief Retrieve a pointer to the start of the multicast routes list
90 * \return A pointer to the start of the multicast routes
91 *
92 * If the multicast routes list is empty, this function will return NULL
93 */
95/*---------------------------------------------------------------------------*/
96/**
97 * \brief Multicast routing table init routine
98 *
99 * Multicast routing tables are not necessarily required by all
100 * multicast engines. For instance, trickle multicast does not rely on
101 * the existence of a routing table. Therefore, this function here
102 * should be invoked by each engine's init routine only if the relevant
103 * functionality is required. This is also why this function should not
104 * get hooked into the uip-ds6 core.
105 */
106void uip_mcast6_route_init(void);
107/** @} */
108
109#endif /* UIP_MCAST6_ROUTE_H_ */
110/** @} */
int uip_mcast6_route_count(void)
Retrieve the count of multicast routes.
uip_mcast6_route_t * uip_mcast6_route_list_head(void)
Retrieve a pointer to the start of the multicast routes list.
uip_mcast6_route_t * uip_mcast6_route_add(uip_ipaddr_t *group)
Add a multicast route.
void uip_mcast6_route_rm(uip_mcast6_route_t *route)
Remove a multicast route.
uip_mcast6_route_t * uip_mcast6_route_lookup(uip_ipaddr_t *group)
Lookup a multicast route.
struct uip_mcast6_route uip_mcast6_route_t
An entry in the multicast routing table.
void uip_mcast6_route_init()
Multicast routing table init routine.
An entry in the multicast routing table.
void * dag
Pointer to an rpl_dag_t struct.
uip_ipaddr_t group
The multicast group.
struct uip_mcast6_route * next
Routes are arranged in a linked list.
uint32_t lifetime
Entry lifetime seconds.
Header file for the uIP TCP/IP stack.