mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-30 09:58:55 +00:00
Remove some unused declarations
This commit is contained in:
parent
07349c3aea
commit
b9396505f8
13
client.c
13
client.c
@ -21,19 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
|
|
||||||
int sock = -1;
|
int sock = -1;
|
||||||
char *outputtemplate = NULL;
|
char *outputtemplate = NULL;
|
||||||
int returnMultiVars = 0;
|
|
||||||
int dnatimeout = 3000; /* default 3000 ms request timeout */
|
|
||||||
|
|
||||||
/* Now that we are using the keyring, we only support a small subset of variables.
|
|
||||||
(VAR_NAME is not properly supported yet)
|
|
||||||
*/
|
|
||||||
struct mphlr_variable vars[]={
|
|
||||||
{VAR_NAME, "name", "Published name of this subscriber"},
|
|
||||||
{VAR_DIDS,"dids","Numbers claimed by this subscriber"},
|
|
||||||
{VAR_LOCATIONS,"locations","Network address of telephone end point"},
|
|
||||||
{0x00,NULL,NULL}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
static int dnatimeout = 3000; /* default 3000 ms request timeout */
|
||||||
|
|
||||||
int packetSendFollowup(struct in_addr destination,
|
int packetSendFollowup(struct in_addr destination,
|
||||||
unsigned char *packet,int packet_len)
|
unsigned char *packet,int packet_len)
|
||||||
|
24
serval.h
24
serval.h
@ -105,7 +105,6 @@ struct in_addr {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
//FIXME #include <getopt.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
@ -144,17 +143,11 @@ struct in_addr {
|
|||||||
/* Limit packet payloads to minimise packet loss of big packets in mesh networks */
|
/* Limit packet payloads to minimise packet loss of big packets in mesh networks */
|
||||||
#define MAX_DATA_BYTES 256
|
#define MAX_DATA_BYTES 256
|
||||||
|
|
||||||
extern int dnatimeout;
|
|
||||||
extern int hlr_size;
|
|
||||||
extern unsigned char *hlr;
|
|
||||||
|
|
||||||
double simulatedBER;
|
double simulatedBER;
|
||||||
|
|
||||||
extern int serverMode;
|
extern int serverMode;
|
||||||
extern int servalShutdown;
|
extern int servalShutdown;
|
||||||
|
|
||||||
extern int returnMultiVars;
|
|
||||||
|
|
||||||
extern char *gatewayspec;
|
extern char *gatewayspec;
|
||||||
|
|
||||||
int rhizome_enabled();
|
int rhizome_enabled();
|
||||||
@ -168,14 +161,6 @@ extern int client_port;
|
|||||||
extern int peer_count;
|
extern int peer_count;
|
||||||
extern struct in_addr peers[MAX_PEERS];
|
extern struct in_addr peers[MAX_PEERS];
|
||||||
|
|
||||||
struct mphlr_variable {
|
|
||||||
unsigned char id;
|
|
||||||
char *name;
|
|
||||||
char *desc;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct mphlr_variable vars[];
|
|
||||||
|
|
||||||
extern char *outputtemplate;
|
extern char *outputtemplate;
|
||||||
extern char *instrumentation_file;
|
extern char *instrumentation_file;
|
||||||
extern char *batman_socket;
|
extern char *batman_socket;
|
||||||
@ -612,27 +597,18 @@ int unpackageVariableSegment(unsigned char *data, int dlen, int flags, struct re
|
|||||||
int packetDecipher(unsigned char *packet,int len,int cipher);
|
int packetDecipher(unsigned char *packet,int len,int cipher);
|
||||||
int safeZeroField(unsigned char *packet,int start,int count);
|
int safeZeroField(unsigned char *packet,int start,int count);
|
||||||
int extractSid(const unsigned char *packet,int *ofs, char *sid);
|
int extractSid(const unsigned char *packet,int *ofs, char *sid);
|
||||||
int hlrSetVariable(unsigned char *hlr,int hofs,int varid,int varinstance,
|
|
||||||
unsigned char *value,int len);
|
|
||||||
int extractDid(unsigned char *packet,int *ofs,char *did);
|
int extractDid(unsigned char *packet,int *ofs,char *did);
|
||||||
char *hlrSid(unsigned char *hlr, int ofs, char *sid);
|
|
||||||
int processRequest(unsigned char *packet,int len,struct sockaddr *sender,int sender_len,
|
int processRequest(unsigned char *packet,int len,struct sockaddr *sender,int sender_len,
|
||||||
unsigned char *transaction_id,int recvttl,char *did,char *sid);
|
unsigned char *transaction_id,int recvttl,char *did,char *sid);
|
||||||
|
|
||||||
int extractRequest(unsigned char *packet,int *packet_ofs,int packet_len,
|
int extractRequest(unsigned char *packet,int *packet_ofs,int packet_len,
|
||||||
int *itemId,int *instance,unsigned char *value,
|
int *itemId,int *instance,unsigned char *value,
|
||||||
int *start_offset,int *max_offset,int *flags);
|
int *start_offset,int *max_offset,int *flags);
|
||||||
int hlrGetVariable(unsigned char *hlr,int hofs,int varid,int varinstance,
|
|
||||||
unsigned char *value,int *len);
|
|
||||||
int dropPacketP(size_t packet_len);
|
int dropPacketP(size_t packet_len);
|
||||||
int additionalPeer(char *peer);
|
int additionalPeer(char *peer);
|
||||||
int readRoutingTable(struct in_addr peers[],int *peer_count,int peer_max);
|
int readRoutingTable(struct in_addr peers[],int *peer_count,int peer_max);
|
||||||
int readBatmanPeerFile(char *file_path,struct in_addr peers[],int *peer_count,int peer_max);
|
int readBatmanPeerFile(char *file_path,struct in_addr peers[],int *peer_count,int peer_max);
|
||||||
int getBatmanPeerList(char *socket_path,struct in_addr peers[],int *peer_count,int peer_max);
|
int getBatmanPeerList(char *socket_path,struct in_addr peers[],int *peer_count,int peer_max);
|
||||||
int hlrDump(unsigned char *hlr,int hofs);
|
|
||||||
int importHlr(char *textfile);
|
|
||||||
int exportHlr(unsigned char *hlr,char *text);
|
|
||||||
int openHlrFile(char *backing_file,int size);
|
|
||||||
int asteriskObtainGateway(char *requestor_sid,char *did,char *uri_out);
|
int asteriskObtainGateway(char *requestor_sid,char *did,char *uri_out);
|
||||||
int packetOkDNA(unsigned char *packet,int len,unsigned char *transaction_id,
|
int packetOkDNA(unsigned char *packet,int len,unsigned char *transaction_id,
|
||||||
int recvttl,struct sockaddr *recvaddr, size_t recvaddrlen,int parseP);
|
int recvttl,struct sockaddr *recvaddr, size_t recvaddrlen,int parseP);
|
||||||
|
2
server.c
2
server.c
@ -40,8 +40,6 @@ int serverRespawnOnCrash = 0;
|
|||||||
int servalShutdown = 0;
|
int servalShutdown = 0;
|
||||||
|
|
||||||
static int server_getpid = 0;
|
static int server_getpid = 0;
|
||||||
unsigned char *hlr=NULL;
|
|
||||||
int hlr_size=0;
|
|
||||||
|
|
||||||
char *instrumentation_file=NULL;
|
char *instrumentation_file=NULL;
|
||||||
FILE *i_f=NULL;
|
FILE *i_f=NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user