2010-07-13 12:15:46 +00:00
|
|
|
/*
|
2013-10-18 10:34:43 +10:30
|
|
|
Serval DNA header file
|
2012-07-30 12:58:21 +09:30
|
|
|
Copyright (C) 2010-2012 Paul Gardner-Stephen
|
2013-12-04 16:56:55 +10:30
|
|
|
Copyright (C) 2012-2013 Serval Project Inc.
|
2010-07-13 12:15:46 +00:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
2013-12-07 18:38:14 +01:00
|
|
|
/*
|
|
|
|
Portions Copyright (C) 2013 Petter Reinholdtsen
|
|
|
|
Some rights reserved
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
|
|
1. Redistributions of source code must retain the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer in
|
|
|
|
the documentation and/or other materials provided with the
|
|
|
|
distribution.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2013-12-04 17:14:14 +10:30
|
|
|
#ifndef __SERVAL_DNA__SERVAL_H
|
|
|
|
#define __SERVAL_DNA__SERVAL_H
|
2012-07-23 13:47:59 +09:30
|
|
|
|
2010-07-13 12:15:46 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <stdlib.h>
|
2012-05-10 12:53:57 +09:30
|
|
|
#include <stdarg.h>
|
2012-05-14 18:32:10 +09:30
|
|
|
#include <sys/types.h>
|
2011-03-30 15:34:23 +10:30
|
|
|
|
|
|
|
#ifdef WIN32
|
2013-11-12 11:39:06 +10:30
|
|
|
# include "win32/win32.h"
|
2011-03-30 15:34:23 +10:30
|
|
|
#else
|
2013-11-12 11:39:06 +10:30
|
|
|
# include <unistd.h>
|
|
|
|
# ifdef HAVE_SYS_SOCKET_H
|
|
|
|
# include <sys/socket.h>
|
|
|
|
# endif
|
|
|
|
# ifdef HAVE_NET_ROUTE_H
|
|
|
|
# include <net/route.h>
|
|
|
|
# endif
|
|
|
|
# ifdef HAVE_LINUX_IF_H
|
|
|
|
# include <linux/if.h>
|
|
|
|
# else
|
|
|
|
# ifdef HAVE_NET_IF_H
|
|
|
|
# include <net/if.h>
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# ifdef HAVE_NETINET_IN_H
|
|
|
|
# include <netinet/in.h>
|
|
|
|
# endif
|
|
|
|
# ifdef HAVE_LINUX_NETLINK_H
|
|
|
|
# include <linux/netlink.h>
|
|
|
|
# endif
|
|
|
|
# ifdef HAVE_LINUX_RTNETLINK_H
|
|
|
|
# include <linux/rtnetlink.h>
|
|
|
|
# endif
|
|
|
|
# ifdef HAVE_IFADDRS_H
|
|
|
|
# include <ifaddrs.h>
|
|
|
|
# endif
|
|
|
|
# ifdef HAVE_SYS_SOCKIO_H
|
|
|
|
# include <sys/sockio.h>
|
|
|
|
# endif
|
|
|
|
# ifdef HAVE_SYS_UCRED_H
|
|
|
|
# include <sys/ucred.h>
|
|
|
|
# endif
|
|
|
|
#endif //!WIN32
|
2011-03-30 15:34:23 +10:30
|
|
|
|
2010-07-13 12:15:46 +00:00
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_MMAN_H
|
|
|
|
#include <sys/mman.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
|
|
#include <sys/time.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETDB_H
|
|
|
|
#include <netdb.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_CTYPE_H
|
|
|
|
#include <ctype.h>
|
|
|
|
#endif
|
2011-03-30 15:34:23 +10:30
|
|
|
|
|
|
|
#ifndef WIN32
|
2010-07-13 12:15:46 +00:00
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#include <sys/un.h>
|
2011-03-30 15:34:23 +10:30
|
|
|
#endif
|
|
|
|
|
2010-07-13 12:15:46 +00:00
|
|
|
#include <fcntl.h>
|
2012-05-10 16:58:25 +09:30
|
|
|
#include <sys/stat.h>
|
2010-07-13 12:15:46 +00:00
|
|
|
|
2014-07-23 10:33:41 +09:30
|
|
|
#include "cli.h"
|
2014-05-23 17:49:00 +09:30
|
|
|
#include "serval_types.h"
|
|
|
|
#include "sighandlers.h"
|
2014-03-24 15:27:04 +10:30
|
|
|
#include "instance.h"
|
2013-10-18 10:34:43 +10:30
|
|
|
#include "fdqueue.h"
|
2012-07-29 12:35:53 +09:30
|
|
|
#include "constants.h"
|
2012-12-04 09:56:24 +10:30
|
|
|
#include "mem.h"
|
2012-08-03 16:44:05 +09:30
|
|
|
#include "xprintf.h"
|
2012-07-29 12:35:53 +09:30
|
|
|
#include "log.h"
|
2012-08-23 12:31:07 +09:30
|
|
|
#include "net.h"
|
2012-12-04 10:12:35 +10:30
|
|
|
#include "os.h"
|
2012-05-14 18:32:10 +09:30
|
|
|
|
2010-07-13 12:15:46 +00:00
|
|
|
#define BATCH 1
|
|
|
|
#define NONBATCH 0
|
|
|
|
|
|
|
|
#define REQ_SERIAL 0
|
|
|
|
#define REQ_PARALLEL -1
|
|
|
|
#define REQ_FIRSTREPLY -2
|
|
|
|
#define REQ_REPLY -101
|
|
|
|
|
|
|
|
|
|
|
|
#define SET_NOREPLACE 1
|
|
|
|
#define SET_REPLACE 2
|
|
|
|
#define SET_NOCREATE 3
|
|
|
|
#define SET_FRAGMENT 0x80
|
|
|
|
|
|
|
|
#define WITHDATA 1
|
|
|
|
#define WITHOUTDATA 0
|
|
|
|
|
|
|
|
/* Limit packet payloads to minimise packet loss of big packets in mesh networks */
|
|
|
|
#define MAX_DATA_BYTES 256
|
|
|
|
|
2013-03-12 14:03:33 +10:30
|
|
|
|
|
|
|
extern const char version_servald[];
|
2013-12-05 13:21:58 +10:30
|
|
|
extern const char copyright_servald[];
|
2013-03-12 14:03:33 +10:30
|
|
|
|
2013-08-29 17:29:32 +09:30
|
|
|
struct cli_parsed;
|
|
|
|
|
2012-05-15 12:56:10 +09:30
|
|
|
int rhizome_enabled();
|
2012-07-12 12:10:59 +09:30
|
|
|
int rhizome_http_server_running();
|
2011-12-17 12:11:32 +10:30
|
|
|
|
2010-07-13 12:15:46 +00:00
|
|
|
#define MAX_PEERS 1024
|
|
|
|
extern int peer_count;
|
2011-04-27 21:18:09 +09:30
|
|
|
extern struct in_addr peers[MAX_PEERS];
|
2010-07-13 12:15:46 +00:00
|
|
|
|
2012-10-03 13:59:46 +09:30
|
|
|
struct subscriber;
|
2012-10-09 12:04:02 +10:30
|
|
|
struct decode_context;
|
2013-12-02 17:17:47 +10:30
|
|
|
struct socket_address;
|
2013-12-09 17:45:47 +10:30
|
|
|
struct overlay_interface;
|
|
|
|
struct network_destination;
|
2014-01-23 16:31:56 +10:30
|
|
|
struct internal_mdp_header;
|
2012-10-03 13:59:46 +09:30
|
|
|
|
2012-08-27 10:04:59 +09:30
|
|
|
struct overlay_buffer;
|
2012-11-20 16:41:06 +10:30
|
|
|
struct overlay_frame;
|
2012-11-23 16:25:32 +10:30
|
|
|
struct broadcast;
|
|
|
|
|
2013-12-11 16:41:57 +10:30
|
|
|
void overlay_mdp_clean_socket_files();
|
2015-03-02 15:41:07 +10:30
|
|
|
int mdp_send_external_packet(struct overlay_interface *interface, struct socket_address *address, const uint8_t *payload, size_t len);
|
2012-07-02 13:19:54 +09:30
|
|
|
|
2012-08-27 10:04:59 +09:30
|
|
|
int overlay_forward_payload(struct overlay_frame *f);
|
2012-07-03 15:36:51 +09:30
|
|
|
int packetOkOverlay(struct overlay_interface *interface,unsigned char *packet, size_t len,
|
2013-12-09 18:22:18 +10:30
|
|
|
struct socket_address *recvaddr);
|
2013-02-07 15:16:07 +10:30
|
|
|
int parseMdpPacketHeader(struct decode_context *context, struct overlay_frame *frame,
|
|
|
|
struct overlay_buffer *buffer, struct subscriber **nexthop);
|
|
|
|
int parseEnvelopeHeader(struct decode_context *context, struct overlay_interface *interface,
|
2013-12-09 17:45:47 +10:30
|
|
|
struct socket_address *addr, struct overlay_buffer *buffer);
|
2013-02-07 15:16:07 +10:30
|
|
|
int process_incoming_frame(time_ms_t now, struct overlay_interface *interface,
|
|
|
|
struct overlay_frame *f, struct decode_context *context);
|
2012-07-02 13:19:54 +09:30
|
|
|
|
2012-08-27 10:04:59 +09:30
|
|
|
int overlay_frame_process(struct overlay_interface *interface, struct overlay_frame *f);
|
2012-07-02 13:19:54 +09:30
|
|
|
|
2013-08-08 15:20:31 +09:30
|
|
|
int overlay_frame_append_payload(struct decode_context *context, int encapsulation,
|
2014-09-23 13:47:48 +09:30
|
|
|
struct overlay_frame *p, struct subscriber *next_hop,
|
|
|
|
struct overlay_buffer *b, char will_retransmit);
|
2013-05-24 13:52:31 +09:30
|
|
|
int overlay_packet_init_header(int packet_version, int encapsulation,
|
2013-02-14 14:18:56 +10:30
|
|
|
struct decode_context *context, struct overlay_buffer *buff,
|
2013-05-15 11:33:43 +09:30
|
|
|
char unicast, char interface, int seq);
|
2013-09-24 12:01:00 +09:30
|
|
|
void rhizome_sync_status_html(struct strbuf *b, struct subscriber *subscriber);
|
2013-09-24 14:23:40 +09:30
|
|
|
int rhizome_cache_count();
|
2011-08-15 09:27:29 +02:00
|
|
|
|
2014-04-07 16:11:11 +09:30
|
|
|
int overlayServerMode(void);
|
2014-06-26 16:47:23 +09:30
|
|
|
int _overlay_payload_enqueue(struct __sourceloc whence, struct overlay_frame *p);
|
|
|
|
#define overlay_payload_enqueue(P) _overlay_payload_enqueue(__WHENCE__,P)
|
2013-01-28 13:35:24 +11:00
|
|
|
int overlay_queue_remaining(int queue);
|
2013-02-06 17:10:43 +10:30
|
|
|
int overlay_queue_schedule_next(time_ms_t next_allowed_packet);
|
2013-08-08 15:20:31 +09:30
|
|
|
int overlay_send_tick_packet(struct network_destination *destination);
|
|
|
|
int overlay_queue_ack(struct subscriber *neighbour, struct network_destination *destination, uint32_t ack_mask, int ack_seq);
|
2013-05-13 12:23:44 +09:30
|
|
|
|
2013-12-09 18:22:18 +10:30
|
|
|
int overlay_rhizome_saw_advertisements(struct decode_context *context, struct overlay_frame *f);
|
2012-05-22 13:05:29 +09:30
|
|
|
int rhizome_saw_voice_traffic();
|
2013-12-09 18:22:18 +10:30
|
|
|
int overlay_saw_mdp_containing_frame(struct overlay_frame *f);
|
2011-10-17 08:11:05 +10:30
|
|
|
|
2013-09-02 14:54:33 +09:30
|
|
|
int serval_packetvisualise(const char *message, const unsigned char *packet, size_t len);
|
|
|
|
int serval_packetvisualise_xpf(XPRINTF xpf, const char *message, const unsigned char *packet, size_t len);
|
2013-09-18 13:44:18 +09:30
|
|
|
void logServalPacket(int level, struct __sourceloc __whence, const char *message, const unsigned char *packet, size_t len);
|
|
|
|
#define DEBUG_packet_visualise(M,P,N) logServalPacket(LOG_LEVEL_DEBUG, __WHENCE__, (M), (P), (N))
|
2012-01-10 21:56:07 +10:30
|
|
|
|
2012-03-05 11:57:31 +13:00
|
|
|
int rhizome_opendb();
|
2012-01-10 21:56:07 +10:30
|
|
|
|
2013-07-03 16:51:27 +09:30
|
|
|
int parseCommandLine(struct cli_context *context, const char *argv0, int argc, const char *const *argv);
|
2012-02-23 12:39:31 +10:30
|
|
|
|
2012-03-28 11:28:04 +10:30
|
|
|
/* Server-side MDP functions */
|
2014-02-03 12:11:56 +10:30
|
|
|
void mdp_init_response(const struct internal_mdp_header *in, struct internal_mdp_header *out);
|
2013-11-25 16:43:32 +10:30
|
|
|
void overlay_mdp_encode_ports(struct overlay_buffer *plaintext, mdp_port_t dst_port, mdp_port_t src_port);
|
2014-01-31 10:38:52 +10:30
|
|
|
int overlay_mdp_dnalookup_reply(struct subscriber *dest, mdp_port_t dest_port,
|
2014-02-05 15:26:56 +10:30
|
|
|
struct subscriber *resolved_sid, const char *uri, const char *did, const char *name);
|
2014-06-26 16:47:23 +09:30
|
|
|
int _overlay_send_frame(struct __sourceloc whence, struct internal_mdp_header *header, struct overlay_buffer *payload);
|
|
|
|
#define overlay_send_frame(H, P) _overlay_send_frame(__WHENCE__, H, P)
|
2013-11-18 13:12:52 +10:30
|
|
|
int mdp_bind_internal(struct subscriber *subscriber, mdp_port_t port,
|
2014-01-23 16:31:56 +10:30
|
|
|
int (*internal)(struct internal_mdp_header *header, struct overlay_buffer *payload));
|
2013-11-18 13:12:52 +10:30
|
|
|
int mdp_unbind_internal(struct subscriber *subscriber, mdp_port_t port,
|
2014-01-23 16:31:56 +10:30
|
|
|
int (*internal)(struct internal_mdp_header *header, struct overlay_buffer *payload));
|
2013-11-18 13:12:52 +10:30
|
|
|
|
2014-05-05 14:34:34 +09:30
|
|
|
int allow_inbound_packet(const struct internal_mdp_header *header);
|
|
|
|
int allow_outbound_packet(const struct internal_mdp_header *header);
|
2014-02-07 15:55:40 +10:30
|
|
|
void load_mdp_packet_rules(const char *filename);
|
2013-11-18 13:12:52 +10:30
|
|
|
|
2012-08-06 14:46:46 +09:30
|
|
|
struct vomp_call_state;
|
2012-09-27 16:27:37 +09:30
|
|
|
|
|
|
|
void set_codec_flag(int codec, unsigned char *flags);
|
|
|
|
|
2013-12-10 17:09:19 +10:30
|
|
|
struct vomp_call_state *vomp_find_call_by_session(unsigned int session_token);
|
2014-01-31 15:02:35 +10:30
|
|
|
int vomp_mdp_received(struct internal_mdp_header *header, struct overlay_buffer *payload);
|
2012-05-04 03:44:41 +09:30
|
|
|
int vomp_parse_dtmf_digit(char c);
|
2012-12-07 16:02:58 +10:30
|
|
|
int vomp_dial(struct subscriber *local, struct subscriber *remote, const char *local_did, const char *remote_did);
|
2012-08-06 14:46:46 +09:30
|
|
|
int vomp_pickup(struct vomp_call_state *call);
|
|
|
|
int vomp_hangup(struct vomp_call_state *call);
|
|
|
|
int vomp_ringing(struct vomp_call_state *call);
|
2012-11-14 15:50:22 +10:30
|
|
|
int vomp_received_audio(struct vomp_call_state *call, int audio_codec, int time, int sequence,
|
|
|
|
const unsigned char *audio, int audio_length);
|
2012-09-27 16:27:37 +09:30
|
|
|
void monitor_get_all_supported_codecs(unsigned char *codecs);
|
2012-07-05 15:52:21 +09:30
|
|
|
|
2012-09-18 12:26:30 +09:30
|
|
|
int directory_registration();
|
|
|
|
int directory_service_init();
|
2012-04-20 15:41:13 +09:30
|
|
|
|
2012-05-03 02:28:39 +09:30
|
|
|
int monitor_get_fds(struct pollfd *fds,int *fdcount,int fdmax);
|
|
|
|
|
|
|
|
int monitor_setup_sockets();
|
|
|
|
int monitor_get_fds(struct pollfd *fds,int *fdcount,int fdmax);
|
2013-10-09 18:54:21 +10:30
|
|
|
int monitor_announce_peer(const sid_t *sidp);
|
|
|
|
int monitor_announce_unreachable_peer(const sid_t *sidp);
|
2013-05-02 14:27:23 +09:30
|
|
|
int monitor_announce_link(int hop_count, struct subscriber *transmitter, struct subscriber *receiver);
|
2012-06-25 15:00:07 +09:30
|
|
|
int monitor_tell_clients(char *msg, int msglen, int mask);
|
2012-08-08 10:56:05 +09:30
|
|
|
int monitor_tell_formatted(int mask, char *fmt, ...);
|
2012-08-06 14:46:46 +09:30
|
|
|
int monitor_client_interested(int mask);
|
2012-05-10 03:46:27 +09:30
|
|
|
|
2012-05-10 14:07:11 +09:30
|
|
|
int scrapeProcNetRoute();
|
2012-05-28 14:54:33 +09:30
|
|
|
int lsif();
|
2012-06-08 16:31:59 +09:30
|
|
|
int doifaddrs();
|
2012-05-21 20:45:07 +09:30
|
|
|
|
2012-09-18 12:24:33 +09:30
|
|
|
int dna_helper_start();
|
2012-07-20 18:17:43 +09:30
|
|
|
int dna_helper_shutdown();
|
2014-01-31 10:38:52 +10:30
|
|
|
int dna_helper_enqueue(struct subscriber *source, mdp_port_t source_port, const char *did);
|
2012-07-23 18:29:57 +09:30
|
|
|
int parseDnaReply(const char *buf, size_t len, char *token, char *did, char *name, char *uri, const char **bufp);
|
2012-06-21 14:35:05 +09:30
|
|
|
|
2015-05-25 11:46:37 +09:30
|
|
|
extern uint16_t mdp_loopback_port;
|
2012-06-26 09:22:51 +09:30
|
|
|
int overlay_mdp_setup_sockets();
|
|
|
|
|
2013-12-09 17:45:47 +10:30
|
|
|
int overlay_packetradio_setup_port(struct overlay_interface *interface);
|
2014-01-23 16:31:56 +10:30
|
|
|
void overlay_mdp_bind_internal_services();
|
2013-08-08 15:20:31 +09:30
|
|
|
int overlay_send_probe(struct subscriber *peer, struct network_destination *destination, int queue);
|
2012-12-07 16:04:40 +10:30
|
|
|
int overlay_send_stun_request(struct subscriber *server, struct subscriber *request);
|
2012-07-02 13:19:54 +09:30
|
|
|
void rhizome_check_connections(struct sched_ent *alarm);
|
|
|
|
|
2012-11-20 16:41:06 +10:30
|
|
|
int overlay_queue_init();
|
|
|
|
|
2012-07-02 13:19:54 +09:30
|
|
|
void monitor_client_poll(struct sched_ent *alarm);
|
|
|
|
void monitor_poll(struct sched_ent *alarm);
|
|
|
|
void rhizome_fetch_poll(struct sched_ent *alarm);
|
|
|
|
void rhizome_server_poll(struct sched_ent *alarm);
|
|
|
|
|
2014-01-29 16:53:19 +10:30
|
|
|
int overlay_mdp_service_stun_req(struct internal_mdp_header *header, struct overlay_buffer *payload);
|
|
|
|
int overlay_mdp_service_stun(struct internal_mdp_header *header, struct overlay_buffer *payload);
|
|
|
|
int overlay_mdp_service_probe(struct internal_mdp_header *header, struct overlay_buffer *payload);
|
2012-12-12 13:40:00 +10:30
|
|
|
|
2012-08-31 14:58:40 +09:30
|
|
|
int olsr_init_socket(void);
|
|
|
|
int olsr_send(struct overlay_frame *frame);
|
|
|
|
|
2013-07-23 14:21:46 +09:30
|
|
|
int pack_uint(unsigned char *buffer, uint64_t v);
|
|
|
|
int measure_packed_uint(uint64_t v);
|
|
|
|
int unpack_uint(unsigned char *buffer, int buff_size, uint64_t *v);
|
|
|
|
|
2013-11-04 14:15:08 +10:30
|
|
|
void rhizome_fetch_log_short_status();
|
2013-02-16 09:09:36 +10:30
|
|
|
extern char crash_handler_clue[1024];
|
2013-02-15 15:37:39 +10:30
|
|
|
|
2015-08-03 11:12:39 +09:30
|
|
|
int link_received_duplicate(struct decode_context *context, int payload_seq);
|
2013-08-09 12:18:14 +09:30
|
|
|
int link_received_packet(struct decode_context *context, int sender_seq, char unicast);
|
2014-01-23 16:31:56 +10:30
|
|
|
int link_receive(struct internal_mdp_header *header, struct overlay_buffer *payload);
|
2013-04-26 16:53:04 +09:30
|
|
|
void link_explained(struct subscriber *subscriber);
|
2013-04-29 17:07:36 +09:30
|
|
|
void link_interface_down(struct overlay_interface *interface);
|
2013-05-08 13:42:11 +09:30
|
|
|
int link_state_announce_links();
|
2013-05-09 14:59:33 +09:30
|
|
|
int link_state_legacy_ack(struct overlay_frame *frame, time_ms_t now);
|
2013-05-15 11:33:43 +09:30
|
|
|
int link_state_ack_soon(struct subscriber *sender);
|
2013-05-29 11:14:26 +09:30
|
|
|
int link_state_should_forward_broadcast(struct subscriber *transmitter);
|
2013-12-09 17:45:47 +10:30
|
|
|
int link_unicast_ack(struct subscriber *subscriber, struct overlay_interface *interface, struct socket_address *addr);
|
2013-08-09 16:19:45 +09:30
|
|
|
int link_add_destinations(struct overlay_frame *frame);
|
2013-09-23 11:11:58 +09:30
|
|
|
void link_neighbour_short_status_html(struct strbuf *b, const char *link_prefix);
|
|
|
|
void link_neighbour_status_html(struct strbuf *b, struct subscriber *neighbour);
|
2013-10-14 14:28:48 +10:30
|
|
|
int link_stop_routing(struct subscriber *subscriber);
|
2014-05-29 16:41:27 +09:30
|
|
|
int link_has_neighbours();
|
2014-06-13 15:34:47 +09:30
|
|
|
int link_interface_has_neighbours(struct overlay_interface *interface);
|
2013-04-26 16:53:04 +09:30
|
|
|
|
2013-12-04 17:14:14 +10:30
|
|
|
#endif // __SERVAL_DNA__SERVAL_H
|