NETWORK ATTACKS FRAMEWORK  1.0.0
A NETwork Attacks framework. Making network attacks impact evaluation easier!
NA_seek_list.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  *
00003  * Copyright (C) 2001 Uppsala University & Ericsson AB.
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  *
00019  * Authors: Erik Nordstr�m, <erik.nordstrom@it.uu.se>
00020  *
00021  *
00022  *****************************************************************************/
00023 #ifndef NA_SEEK_LIST_H
00024 #define NA_SEEK_LIST_H
00025 
00026 #ifndef NS_NO_GLOBALS
00027 #include "NA_defs_aodv.h"
00028 #include "NA_timer_queue_aodv.h"
00029 #include "NA_list.h"
00030 
00031 #define IP_DATA_MAX_LEN 60 + 8  /* Max IP header + 64 bits of data */
00032 
00033 struct ip_data
00034 {
00035     char data[IP_DATA_MAX_LEN];
00036     int len;
00037 };
00038 
00039 /* This is a list of nodes that route discovery are performed for */
00040 typedef struct seek_list
00041 {
00042     list_t l;
00043     struct in_addr dest_addr;
00044     u_int32_t dest_seqno;
00045     struct ip_data *ipd;
00046     u_int8_t flags;     /* The flags we are using for resending the RREQ */
00047     int reqs;
00048     int ttl;
00049     struct timer seek_timer;
00050 } seek_list_t;
00051 #endif              /* NS_NO_GLOBALS */
00052 
00053 #ifndef NS_NO_DECLARATIONS
00054 
00055 seek_list_t *seek_list_insert(struct in_addr dest_addr, u_int32_t dest_seqno,
00056                               int ttl, u_int8_t flags, struct ip_data *ipd);
00057 int seek_list_remove(seek_list_t * entry);
00058 seek_list_t *seek_list_find(struct in_addr dest_addr);
00059 
00060 #ifdef NS_PORT
00061 #ifdef SEEK_LIST_DEBUG
00062 void seek_list_print();
00063 #endif
00064 #endif              /* NS_PORT */
00065 #endif              /* NS_NO_DECLARATIONS */
00066 
00067 #endif              /* SEEK_LIST_H */
 All Classes Files Functions Variables Typedefs Enumerator Defines