Blame ip/tunnel.h

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