~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
cvs/emstar/link/include/conntest.h


  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 conntest
 34  * service
 35  *
 36  * $Id: conntest.h,v 1.6 2004-02-22 01:02:09 girod Exp $
 37  */
 38 
 39 #ifndef __CONNTEST_H__
 40 #define __CONNTEST_H__
 41 
 42 #include "libdev/glib_dev.h"
 43 #include "libdev/status_client.h"
 44 #include "link/link.h"
 45 
 46 /* Typedef for seqnos, which are 64 bits */
 47 typedef uint64_t seqno_t;
 48 
 49 /*
 50  * State about a particular neighbor -- The information that is
 51  * exported to users of the daemon
 52  */
 53 typedef struct neigh {
 54   node_id_t node_id;          /* Neighbor's node ID */
 55   conn_t conn_in;             /* Neighbor's estimate incoming conn 
 56                                  value */
 57   int total_pkts_recv;        /* Total pkts received from this
 58                                  neighbor */
 59   seqno_t last_seqno;         /* Last seqno received from this 
 60                                  neighbor */
 61   struct timeval last_heard;  /* Last time heard from this neighbor */
 62 } neigh_t;
 63 
 64 
 65 /*
 66  * These function calls are used by your application to set up a
 67  * connection to the conntest service.
 68  */
 69 
 70 /* Callback to be activated when a new neighborlist is available.
 71  * This is malloced memory that YOU are responsible for freeing. */
 72 typedef gint (*new_info_cb_t)(neigh_t *nb_list, int count, void *data);
 73 
 74 typedef struct conntest_opts {
 75   char *link_name;        /* the link we want the neighbors stats of */
 76   new_info_cb_t new_info; /* callback for new neighborlists */
 77   void *data;             /* user data */
 78 } conntest_opts_t;
 79 
 80 
 81 /* start linkstats notification */
 82 int g_conntest(conntest_opts_t *conntest_opts, status_client_context_t **ref);
 83 
 84 #endif /* __CONNTEST_H__ */
 85 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.