Blame ip/tunnel.h

Packit d3f73b
/*
Packit d3f73b
 * Copyright (C)2006 USAGI/WIDE Project
Packit d3f73b
 *
Packit d3f73b
 * This program is free software; you can redistribute it and/or modify
Packit d3f73b
 * it under the terms of the GNU General Public License as published by
Packit d3f73b
 * the Free Software Foundation; either version 2 of the License, or
Packit d3f73b
 * (at your option) any later version.
Packit d3f73b
 *
Packit d3f73b
 * This program is distributed in the hope that it will be useful,
Packit d3f73b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit d3f73b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit d3f73b
 * GNU General Public License for more details.
Packit d3f73b
 *
Packit d3f73b
 * You should have received a copy of the GNU General Public License
Packit d3f73b
 * along with this program; if not, see <http://www.gnu.org/licenses>.
Packit d3f73b
 */
Packit d3f73b
/*
Packit d3f73b
 * Author:
Packit d3f73b
 *	Masahide NAKAMURA @USAGI
Packit d3f73b
 */
Packit d3f73b
#ifndef __TUNNEL_H__
Packit d3f73b
#define __TUNNEL_H__ 1
Packit d3f73b
Packit d3f73b
#include <stdbool.h>
Packit d3f73b
#include <linux/types.h>
Packit d3f73b
Packit d3f73b
struct rtattr;
Packit d3f73b
struct ifinfomsg;
Packit d3f73b
Packit d3f73b
extern struct rtnl_handle rth;
Packit d3f73b
Packit d3f73b
struct tnl_print_nlmsg_info {
Packit d3f73b
	const struct ifinfomsg *ifi;
Packit d3f73b
	const void *p1;
Packit d3f73b
	void *p2;
Packit d3f73b
Packit d3f73b
	void (*init)(const struct tnl_print_nlmsg_info *info);
Packit d3f73b
	bool (*match)(const struct tnl_print_nlmsg_info *info);
Packit d3f73b
	void (*print)(const void *t);
Packit d3f73b
};
Packit d3f73b
Packit d3f73b
int do_tunnels_list(struct tnl_print_nlmsg_info *info);
Packit d3f73b
Packit d3f73b
const char *tnl_strproto(__u8 proto);
Packit d3f73b
Packit d3f73b
int tnl_get_ioctl(const char *basedev, void *p);
Packit d3f73b
int tnl_add_ioctl(int cmd, const char *basedev, const char *name, void *p);
Packit d3f73b
int tnl_del_ioctl(const char *basedev, const char *name, void *p);
Packit d3f73b
int tnl_prl_ioctl(int cmd, const char *name, void *p);
Packit d3f73b
int tnl_6rd_ioctl(int cmd, const char *name, void *p);
Packit d3f73b
int tnl_ioctl_get_6rd(const char *name, void *p);
Packit d3f73b
__be32 tnl_parse_key(const char *name, const char *key);
Packit d3f73b
void tnl_print_encap(struct rtattr *tb[],
Packit d3f73b
		     int encap_type, int encap_flags,
Packit d3f73b
		     int encap_sport, int encap_dport);
Packit d3f73b
void tnl_print_endpoint(const char *name,
Packit d3f73b
			const struct rtattr *rta, int family);
Packit d3f73b
Packit d3f73b
#endif