Blame mtab.h

Packit 9c3e7e
/**
Packit 9c3e7e
 * @file mtab.h
Packit 9c3e7e
 * @brief master table implementation
Packit 9c3e7e
 * @note Copyright (C) 2018 Richard Cochran <richardcochran@gmail.com>
Packit 9c3e7e
 *
Packit 9c3e7e
 * This program is free software; you can redistribute it and/or modify
Packit 9c3e7e
 * it under the terms of the GNU General Public License as published by
Packit 9c3e7e
 * the Free Software Foundation; either version 2 of the License, or
Packit 9c3e7e
 * (at your option) any later version.
Packit 9c3e7e
 *
Packit 9c3e7e
 * This program is distributed in the hope that it will be useful,
Packit 9c3e7e
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 9c3e7e
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 9c3e7e
 * GNU General Public License for more details.
Packit 9c3e7e
 *
Packit 9c3e7e
 * You should have received a copy of the GNU General Public License along
Packit 9c3e7e
 * with this program; if not, write to the Free Software Foundation, Inc.,
Packit 9c3e7e
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA.
Packit 9c3e7e
 */
Packit 9c3e7e
#ifndef HAVE_MTAB_H
Packit 9c3e7e
#define HAVE_MTAB_H
Packit 9c3e7e
Packit 9c3e7e
#include <sys/queue.h>
Packit 9c3e7e
#include <time.h>
Packit 9c3e7e
Packit 9c3e7e
#include "address.h"
Packit 9c3e7e
#include "pdt.h"
Packit 9c3e7e
#include "transport.h"
Packit 9c3e7e
#include "unicast_fsm.h"
Packit 9c3e7e
Packit 9c3e7e
struct unicast_master_address {
Packit 9c3e7e
	STAILQ_ENTRY(unicast_master_address) list;
Packit 9c3e7e
	struct PortIdentity portIdentity;
Packit 9c3e7e
	enum transport_type type;
Packit 9c3e7e
	enum unicast_state state;
Packit 9c3e7e
	struct address address;
Packit 9c3e7e
	unsigned int granted;
Packit 9c3e7e
	unsigned int sydymsk;
Packit 9c3e7e
	time_t renewal_tmo;
Packit 9c3e7e
};
Packit 9c3e7e
Packit 9c3e7e
struct unicast_master_table {
Packit 9c3e7e
	STAILQ_HEAD(addrs_head, unicast_master_address) addrs;
Packit 9c3e7e
	STAILQ_ENTRY(unicast_master_table) list;
Packit 9c3e7e
	Integer8 logQueryInterval;
Packit 9c3e7e
	int table_index;
Packit 9c3e7e
	int count;
Packit 9c3e7e
	int port;
Packit 9c3e7e
	/* for use with P2P delay mechanism: */
Packit 9c3e7e
	struct unicast_master_address peer_addr;
Packit 9c3e7e
	char *peer_name;
Packit 9c3e7e
};
Packit 9c3e7e
Packit 9c3e7e
#endif