[PATCH 2/2] ipgre: rename api and fix attribute
Susant Sahani
susant at redhat.com
Mon May 5 22:41:31 PDT 2014
ADD ipgre to the public API's to avoide confusion
fix: IPGRE_ATTR_OKEY
---
include/netlink/route/link/ipgre.h | 20 ++++++++++----------
lib/route/link/ipgre.c | 18 +++++++++---------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/include/netlink/route/link/ipgre.h b/include/netlink/route/link/ipgre.h
index 6415400..5a0a295 100644
--- a/include/netlink/route/link/ipgre.h
+++ b/include/netlink/route/link/ipgre.h
@@ -1,5 +1,5 @@
/*
- * netlink/route/link/ip_gre.h IPIP interface
+ * netlink/route/link/ip_gre.h IPGRE interface
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -26,31 +26,31 @@ extern "C" {
extern uint32_t rtnl_link_ipgre_get_link(struct rtnl_link *link);
extern int rtnl_link_ipgre_set_iflags(struct rtnl_link *link, uint16_t iflags);
- extern uint16_t rtnl_link_get_iflags(struct rtnl_link *link);
+ extern uint16_t rtnl_link_ipgre_get_iflags(struct rtnl_link *link);
extern int rtnl_link_ipgre_set_oflags(struct rtnl_link *link, uint16_t oflags);
- extern uint16_t rtnl_link_get_oflags(struct rtnl_link *link);
+ extern uint16_t rtnl_link_ipgre_get_oflags(struct rtnl_link *link);
extern int rtnl_link_ipgre_set_ikey(struct rtnl_link *link, uint32_t ikey);
- extern uint32_t rtnl_link_get_ikey(struct rtnl_link *link);
+ extern uint32_t rtnl_link_ipgre_get_ikey(struct rtnl_link *link);
extern int rtnl_link_ipgre_set_okey(struct rtnl_link *link, uint32_t okey);
- extern uint32_t rtnl_link_get_okey(struct rtnl_link *link);
+ extern uint32_t rtnl_link_ipgre_get_okey(struct rtnl_link *link);
extern int rtnl_link_ipgre_set_local(struct rtnl_link *link, uint32_t addr);
- extern uint32_t rtnl_link_get_local(struct rtnl_link *link);
+ extern uint32_t rtnl_link_ipgre_get_local(struct rtnl_link *link);
extern int rtnl_link_ipgre_set_remote(struct rtnl_link *link, uint32_t addr);
- extern uint32_t rtnl_link_get_remote(struct rtnl_link *link);
+ extern uint32_t rtnl_link_ipgre_get_remote(struct rtnl_link *link);
extern int rtnl_link_ipgre_set_ttl(struct rtnl_link *link, uint8_t ttl);
- extern uint8_t rtnl_link_get_ttl(struct rtnl_link *link);
+ extern uint8_t rtnl_link_ipgre_get_ttl(struct rtnl_link *link);
extern int rtnl_link_ipgre_set_tos(struct rtnl_link *link, uint8_t tos);
- extern uint8_t rtnl_link_get_tos(struct rtnl_link *link);
+ extern uint8_t rtnl_link_ipgre_get_tos(struct rtnl_link *link);
extern int rtnl_link_ipgre_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc);
- extern uint8_t rtnl_link_get_pmtudisc(struct rtnl_link *link);
+ extern uint8_t rtnl_link_ipgre_get_pmtudisc(struct rtnl_link *link);
#ifdef __cplusplus
}
diff --git a/lib/route/link/ipgre.c b/lib/route/link/ipgre.c
index df9d65d..74dbb9d 100644
--- a/lib/route/link/ipgre.c
+++ b/lib/route/link/ipgre.c
@@ -179,7 +179,7 @@ static int ipgre_put_attrs(struct nl_msg *msg, struct rtnl_link *link)
if (ipgre->ipgre_mask & IPGRE_ATTR_IKEY)
NLA_PUT_U32(msg, IFLA_GRE_IKEY, ipgre->ikey);
- if (ipgre->ipgre_mask & IFLA_GRE_OKEY)
+ if (ipgre->ipgre_mask & IPGRE_ATTR_OKEY)
NLA_PUT_U32(msg, IFLA_GRE_OKEY, ipgre->okey);
if (ipgre->ipgre_mask & IPGRE_ATTR_LOCAL)
@@ -435,7 +435,7 @@ int rtnl_link_ipgre_set_iflags(struct rtnl_link *link, uint16_t iflags)
*
* @return iflags
*/
-uint16_t rtnl_link_get_iflags(struct rtnl_link *link)
+uint16_t rtnl_link_ipgre_get_iflags(struct rtnl_link *link)
{
struct ipgre_info *ipgre = link->l_info;
@@ -469,7 +469,7 @@ int rtnl_link_ipgre_set_oflags(struct rtnl_link *link, uint16_t oflags)
*
* @return oflags
*/
-uint16_t rtnl_link_get_oflags(struct rtnl_link *link)
+uint16_t rtnl_link_ipgre_get_oflags(struct rtnl_link *link)
{
struct ipgre_info *ipgre = link->l_info;
@@ -503,7 +503,7 @@ int rtnl_link_ipgre_set_ikey(struct rtnl_link *link, uint32_t ikey)
*
* @return ikey
*/
-uint32_t rtnl_link_get_ikey(struct rtnl_link *link)
+uint32_t rtnl_link_ipgre_get_ikey(struct rtnl_link *link)
{
struct ipgre_info *ipgre = link->l_info;
@@ -537,7 +537,7 @@ int rtnl_link_ipgre_set_okey(struct rtnl_link *link, uint32_t okey)
*
* @return okey value
*/
-uint32_t rtnl_link_get_okey(struct rtnl_link *link)
+uint32_t rtnl_link_ipgre_get_okey(struct rtnl_link *link)
{
struct ipgre_info *ipgre = link->l_info;
@@ -571,7 +571,7 @@ int rtnl_link_ipgre_set_local(struct rtnl_link *link, uint32_t addr)
*
* @return local address
*/
-uint32_t rtnl_link_get_local(struct rtnl_link *link)
+uint32_t rtnl_link_ipgre_get_local(struct rtnl_link *link)
{
struct ipgre_info *ipgre = link->l_info;
@@ -605,7 +605,7 @@ int rtnl_link_ipgre_set_remote(struct rtnl_link *link, uint32_t remote)
*
* @return remote address on success or a negative error code
*/
-uint32_t rtnl_link_get_remote(struct rtnl_link *link)
+uint32_t rtnl_link_ipgre_get_remote(struct rtnl_link *link)
{
struct ipgre_info *ipgre = link->l_info;
@@ -639,7 +639,7 @@ int rtnl_link_ipgre_set_ttl(struct rtnl_link *link, uint8_t ttl)
*
* @return ttl value
*/
-uint8_t rtnl_link_get_ttl(struct rtnl_link *link)
+uint8_t rtnl_link_ipgre_get_ttl(struct rtnl_link *link)
{
struct ipgre_info *ipgre = link->l_info;
@@ -673,7 +673,7 @@ int rtnl_link_ipgre_set_tos(struct rtnl_link *link, uint8_t tos)
*
* @return tos value
*/
-uint8_t rtnl_link_get_tos(struct rtnl_link *link)
+uint8_t rtnl_link_ipgre_get_tos(struct rtnl_link *link)
{
struct ipgre_info *ipgre = link->l_info;
--
1.9.0
More information about the libnl
mailing list