1 /*
2 *
3 * Copyright (c) 2003 The Regents of the University of California. All
4 * rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * - Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * - Neither the name of the University nor the names of its
14 * contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 */
30
31
32 /*
33 * Structs and interface definitions for talking to the neighbor
34 * service
35 *
36 * $Id: neighbor.h,v 1.13 2004-11-16 00:27:06 girod Exp $
37 */
38
39 #ifndef __NEIGHBOR_H__
40 #define __NEIGHBOR_H__
41
42 #include "libdev/status_client.h"
43 #include "link/link.h"
44 #include "link/neighbor_structs.h"
45
46 /*
47 * These function calls are used by your application to set up a
48 * connection to the neighbor discovery service.
49 */
50
51
52 /* Callback to be activated when a new neighborlist is available.
53 * This is malloced memory that YOU are responsible for freeing. */
54 typedef gint (*new_list_cb_t)(neighbor_t *nb_list, int count,
55 void *data);
56
57 typedef struct neighbor_opts {
58 char *link_name; /* the link we want the neighbors of */
59 int refresh_rate; /* soft-state refresh rate (default 10 sec) */
60 new_list_cb_t new_list; /* callback for new neighborlists */
61 void *data; /* user data */
62 int no_init_crashproof; /* require device to be present on event create */
63 } neighbor_opts_t;
64
65
66 /* start neighbor discovery notification */
67 int g_neighbors(neighbor_opts_t *neighbor_opts, status_client_context_t **ref);
68
69 #endif /* __NEIGHBOR_H__ */
70
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.