mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-12-08 03:31:54 +00:00
Instead of duplicating the same code six times (key, ikey and okey in iptunnel and ip6tunnel), have a common parsing routine. This has the added benefit of having the same verbose error message in ip6tunnel as well as iptunnel. I'm not sure if parsing an IPv4 address as key makes sense for ip6tunnel, but the code was there before so this patch at least doesn't make it worse. Signed-off-by: Phil Sutter <phil@nwl.cc>
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
/*
|
|
* Copyright (C)2006 USAGI/WIDE Project
|
|
*
|
|
* 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, see <http://www.gnu.org/licenses>.
|
|
*/
|
|
/*
|
|
* Author:
|
|
* Masahide NAKAMURA @USAGI
|
|
*/
|
|
#ifndef __TUNNEL_H__
|
|
#define __TUNNEL_H__ 1
|
|
|
|
#include <linux/types.h>
|
|
|
|
const char *tnl_strproto(__u8 proto);
|
|
|
|
int tnl_get_ioctl(const char *basedev, void *p);
|
|
int tnl_add_ioctl(int cmd, const char *basedev, const char *name, void *p);
|
|
int tnl_del_ioctl(const char *basedev, const char *name, void *p);
|
|
int tnl_prl_ioctl(int cmd, const char *name, void *p);
|
|
int tnl_6rd_ioctl(int cmd, const char *name, void *p);
|
|
int tnl_ioctl_get_6rd(const char *name, void *p);
|
|
__be32 tnl_parse_key(const char *name, const char *key);
|
|
|
|
#endif
|