pimd: fix worst char * <> uint8_t * intermingling
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c
index 52168d6..6b062b7 100644
--- a/pimd/pim_assert.c
+++ b/pimd/pim_assert.c
@@ -236,13 +236,13 @@
int pim_assert_recv(struct interface *ifp,
struct pim_neighbor *neigh,
struct in_addr src_addr,
- char *buf, int buf_size)
+ uint8_t *buf, int buf_size)
{
struct prefix msg_group_addr;
struct prefix msg_source_addr;
struct pim_assert_metric msg_metric;
int offset;
- char *curr;
+ uint8_t *curr;
int curr_size;
on_trace(__PRETTY_FUNCTION__, ifp, src_addr);
@@ -445,7 +445,7 @@
{
struct interface *ifp;
struct pim_interface *pim_ifp;
- char pim_msg[1000];
+ uint8_t pim_msg[1000];
int pim_msg_size;
ifp = ch->interface;
diff --git a/pimd/pim_assert.h b/pimd/pim_assert.h
index feeb91d..bd3fb3e 100644
--- a/pimd/pim_assert.h
+++ b/pimd/pim_assert.h
@@ -51,7 +51,7 @@
int pim_assert_recv(struct interface *ifp,
struct pim_neighbor *neigh,
struct in_addr src_addr,
- char *buf, int buf_size);
+ uint8_t *buf, int buf_size);
int pim_assert_metric_better(const struct pim_assert_metric *m1,
const struct pim_assert_metric *m2);
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index dd06b07..f046801 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -3567,8 +3567,8 @@
"Neighbor address\n"
"Packet dump\n")
{
- char buf[1000];
- char *pim_msg;
+ uint8_t buf[1000];
+ uint8_t *pim_msg;
struct ip *ip_hdr;
size_t ip_hlen; /* ip header length in bytes */
int ip_msg_len;
@@ -3685,8 +3685,8 @@
"Neighbor LAN prune delay T-bit\n"
"Neighbor secondary addresses\n")
{
- char buf[1000];
- char *pim_msg;
+ uint8_t buf[1000];
+ uint8_t *pim_msg;
struct ip *ip_hdr;
size_t ip_hlen; /* ip header length in bytes */
int ip_msg_len;
@@ -3810,9 +3810,9 @@
"Assert route metric\n"
"Assert RPT bit flag\n")
{
- char buf[1000];
- char *buf_pastend = buf + sizeof(buf);
- char *pim_msg;
+ uint8_t buf[1000];
+ uint8_t *buf_pastend = buf + sizeof(buf);
+ uint8_t *pim_msg;
struct ip *ip_hdr;
size_t ip_hlen; /* ip header length in bytes */
int ip_msg_len;
@@ -3921,10 +3921,10 @@
const char *argv[],
int src_is_join)
{
- char buf[1000];
- const char *buf_pastend = buf + sizeof(buf);
- char *pim_msg;
- char *pim_msg_curr;
+ uint8_t buf[1000];
+ const uint8_t *buf_pastend = buf + sizeof(buf);
+ uint8_t *pim_msg;
+ uint8_t *pim_msg_curr;
int pim_msg_size;
struct ip *ip_hdr;
size_t ip_hlen; /* ip header length in bytes */
diff --git a/pimd/pim_hello.c b/pimd/pim_hello.c
index c942de4..73c50d4 100644
--- a/pimd/pim_hello.c
+++ b/pimd/pim_hello.c
@@ -146,12 +146,12 @@
int pim_hello_recv(struct interface *ifp,
struct in_addr src_addr,
- char *tlv_buf, int tlv_buf_size)
+ uint8_t *tlv_buf, int tlv_buf_size)
{
struct pim_interface *pim_ifp;
struct pim_neighbor *neigh;
- char *tlv_curr;
- char *tlv_pastend;
+ uint8_t *tlv_curr;
+ uint8_t *tlv_pastend;
pim_hello_options hello_options = 0; /* bit array recording options found */
uint16_t hello_option_holdtime = 0;
uint16_t hello_option_propagation_delay = 0;
@@ -422,7 +422,7 @@
}
int pim_hello_build_tlv(const char *ifname,
- char *tlv_buf, int tlv_buf_size,
+ uint8_t *tlv_buf, int tlv_buf_size,
uint16_t holdtime,
uint32_t dr_priority,
uint32_t generation_id,
@@ -431,9 +431,9 @@
int can_disable_join_suppression,
struct list *ifconnected)
{
- char *curr = tlv_buf;
- char *pastend = tlv_buf + tlv_buf_size;
- char *tmp;
+ uint8_t *curr = tlv_buf;
+ uint8_t *pastend = tlv_buf + tlv_buf_size;
+ uint8_t *tmp;
/*
* Append options
diff --git a/pimd/pim_hello.h b/pimd/pim_hello.h
index 90a11ba..b5e272d 100644
--- a/pimd/pim_hello.h
+++ b/pimd/pim_hello.h
@@ -29,10 +29,10 @@
int pim_hello_recv(struct interface *ifp,
struct in_addr src_addr,
- char *tlv_buf, int tlv_buf_size);
+ uint8_t *tlv_buf, int tlv_buf_size);
int pim_hello_build_tlv(const char *ifname,
- char *tlv_buf, int tlv_buf_size,
+ uint8_t *tlv_buf, int tlv_buf_size,
uint16_t holdtime,
uint32_t dr_priority,
uint32_t generation_id,
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index dcb9a9b..6ad521c 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -930,7 +930,7 @@
struct sockaddr_in to;
socklen_t fromlen = sizeof(from);
socklen_t tolen = sizeof(to);
- char buf[PIM_IGMP_BUFSIZE_READ];
+ uint8_t buf[PIM_IGMP_BUFSIZE_READ];
int len;
int ifindex = -1;
int result = -1; /* defaults to bad */
@@ -995,7 +995,7 @@
}
#endif
- if (pim_igmp_packet(igmp, buf, len)) {
+ if (pim_igmp_packet(igmp, (char *)buf, len)) {
goto done;
}
diff --git a/pimd/pim_join.c b/pimd/pim_join.c
index aa3aa78..5230bb6 100644
--- a/pimd/pim_join.c
+++ b/pimd/pim_join.c
@@ -107,14 +107,14 @@
int pim_joinprune_recv(struct interface *ifp,
struct pim_neighbor *neigh,
struct in_addr src_addr,
- char *tlv_buf, int tlv_buf_size)
+ uint8_t *tlv_buf, int tlv_buf_size)
{
struct prefix msg_upstream_addr;
uint8_t msg_num_groups;
uint16_t msg_holdtime;
int addr_offset;
- char *buf;
- char *pastend;
+ uint8_t *buf;
+ uint8_t *pastend;
int remain;
int group;
@@ -280,9 +280,9 @@
int send_join)
{
struct pim_interface *pim_ifp;
- char pim_msg[1000];
- const char *pastend = pim_msg + sizeof(pim_msg);
- char *pim_msg_curr = pim_msg + PIM_MSG_HEADER_LEN; /* room for pim header */
+ uint8_t pim_msg[1000];
+ const uint8_t *pastend = pim_msg + sizeof(pim_msg);
+ uint8_t *pim_msg_curr = pim_msg + PIM_MSG_HEADER_LEN; /* room for pim header */
int pim_msg_size;
int remain;
diff --git a/pimd/pim_join.h b/pimd/pim_join.h
index 4d9407b..37ec0f4 100644
--- a/pimd/pim_join.h
+++ b/pimd/pim_join.h
@@ -32,7 +32,7 @@
int pim_joinprune_recv(struct interface *ifp,
struct pim_neighbor *neigh,
struct in_addr src_addr,
- char *tlv_buf, int tlv_buf_size);
+ uint8_t *tlv_buf, int tlv_buf_size);
int pim_joinprune_send(struct interface *ifp,
struct in_addr upstream_addr,
diff --git a/pimd/pim_msg.c b/pimd/pim_msg.c
index 1105eac..7eb63e8 100644
--- a/pimd/pim_msg.c
+++ b/pimd/pim_msg.c
@@ -27,7 +27,7 @@
#include "pim_msg.h"
#include "pim_util.h"
-void pim_msg_build_header(char *pim_msg, int pim_msg_size,
+void pim_msg_build_header(uint8_t *pim_msg, int pim_msg_size,
uint8_t pim_msg_type)
{
uint16_t checksum;
@@ -50,9 +50,9 @@
*(uint16_t *) PIM_MSG_HDR_OFFSET_CHECKSUM(pim_msg) = checksum;
}
-char *pim_msg_addr_encode_ipv4_ucast(char *buf,
- int buf_size,
- struct in_addr addr)
+uint8_t *pim_msg_addr_encode_ipv4_ucast(uint8_t *buf,
+ int buf_size,
+ struct in_addr addr)
{
const int ENCODED_IPV4_UCAST_SIZE = 6;
@@ -67,9 +67,9 @@
return buf + ENCODED_IPV4_UCAST_SIZE;
}
-char *pim_msg_addr_encode_ipv4_group(char *buf,
- int buf_size,
- struct in_addr addr)
+uint8_t *pim_msg_addr_encode_ipv4_group(uint8_t *buf,
+ int buf_size,
+ struct in_addr addr)
{
const int ENCODED_IPV4_GROUP_SIZE = 8;
@@ -86,9 +86,9 @@
return buf + ENCODED_IPV4_GROUP_SIZE;
}
-char *pim_msg_addr_encode_ipv4_source(char *buf,
- int buf_size,
- struct in_addr addr)
+uint8_t *pim_msg_addr_encode_ipv4_source(uint8_t *buf,
+ int buf_size,
+ struct in_addr addr)
{
const int ENCODED_IPV4_SOURCE_SIZE = 8;
diff --git a/pimd/pim_msg.h b/pimd/pim_msg.h
index 228d6a8..a884fc8 100644
--- a/pimd/pim_msg.h
+++ b/pimd/pim_msg.h
@@ -37,16 +37,16 @@
*/
#define PIM_MSG_ADDRESS_FAMILY_IPV4 (1)
-void pim_msg_build_header(char *pim_msg, int pim_msg_size,
+void pim_msg_build_header(uint8_t *pim_msg, int pim_msg_size,
uint8_t pim_msg_type);
-char *pim_msg_addr_encode_ipv4_ucast(char *buf,
- int buf_size,
- struct in_addr addr);
-char *pim_msg_addr_encode_ipv4_group(char *buf,
- int buf_size,
- struct in_addr addr);
-char *pim_msg_addr_encode_ipv4_source(char *buf,
- int buf_size,
- struct in_addr addr);
+uint8_t *pim_msg_addr_encode_ipv4_ucast(uint8_t *buf,
+ int buf_size,
+ struct in_addr addr);
+uint8_t *pim_msg_addr_encode_ipv4_group(uint8_t *buf,
+ int buf_size,
+ struct in_addr addr);
+uint8_t *pim_msg_addr_encode_ipv4_source(uint8_t *buf,
+ int buf_size,
+ struct in_addr addr);
#endif /* PIM_MSG_H */
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c
index 156081c..8dd71d6 100644
--- a/pimd/pim_pim.c
+++ b/pimd/pim_pim.c
@@ -111,13 +111,13 @@
sock_close(ifp);
}
-int pim_pim_packet(struct interface *ifp, char *buf, size_t len)
+int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len)
{
struct ip *ip_hdr;
size_t ip_hlen; /* ip header length in bytes */
char src_str[100];
char dst_str[100];
- char *pim_msg;
+ uint8_t *pim_msg;
int pim_msg_len;
uint8_t pim_version;
uint8_t pim_type;
@@ -253,7 +253,7 @@
struct sockaddr_in to;
socklen_t fromlen = sizeof(from);
socklen_t tolen = sizeof(to);
- char buf[PIM_PIM_BUFSIZE_READ];
+ uint8_t buf[PIM_PIM_BUFSIZE_READ];
int len;
int ifindex = -1;
int result = -1; /* defaults to bad */
@@ -437,7 +437,7 @@
int pim_msg_send(int fd,
struct in_addr dst,
- char *pim_msg,
+ uint8_t *pim_msg,
int pim_msg_size,
const char *ifname)
{
@@ -494,7 +494,7 @@
static int hello_send(struct interface *ifp,
uint16_t holdtime)
{
- char pim_msg[PIM_PIM_BUFSIZE_WRITE];
+ uint8_t pim_msg[PIM_PIM_BUFSIZE_WRITE];
struct pim_interface *pim_ifp;
int pim_tlv_size;
int pim_msg_size;
diff --git a/pimd/pim_pim.h b/pimd/pim_pim.h
index a2c8fa5..6be1a3e 100644
--- a/pimd/pim_pim.h
+++ b/pimd/pim_pim.h
@@ -60,11 +60,11 @@
void pim_hello_restart_now(struct interface *ifp);
void pim_hello_restart_triggered(struct interface *ifp);
-int pim_pim_packet(struct interface *ifp, char *buf, size_t len);
+int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len);
int pim_msg_send(int fd,
struct in_addr dst,
- char *pim_msg,
+ uint8_t *pim_msg,
int pim_msg_size,
const char *ifname);
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c
index b80c0a2..4816c56 100644
--- a/pimd/pim_sock.c
+++ b/pimd/pim_sock.c
@@ -249,7 +249,7 @@
return 0;
}
-int pim_socket_recvfromto(int fd, char *buf, size_t len,
+int pim_socket_recvfromto(int fd, uint8_t *buf, size_t len,
struct sockaddr_in *from, socklen_t *fromlen,
struct sockaddr_in *to, socklen_t *tolen,
int *ifindex)
diff --git a/pimd/pim_sock.h b/pimd/pim_sock.h
index 29b5aee..cfe39ad 100644
--- a/pimd/pim_sock.h
+++ b/pimd/pim_sock.h
@@ -45,7 +45,7 @@
struct in_addr group_addr,
struct in_addr source_addr,
const char *ifname);
-int pim_socket_recvfromto(int fd, char *buf, size_t len,
+int pim_socket_recvfromto(int fd, uint8_t *buf, size_t len,
struct sockaddr_in *from, socklen_t *fromlen,
struct sockaddr_in *to, socklen_t *tolen,
int *ifindex);
diff --git a/pimd/pim_ssmpingd.c b/pimd/pim_ssmpingd.c
index 652999d..fd1eac0 100644
--- a/pimd/pim_ssmpingd.c
+++ b/pimd/pim_ssmpingd.c
@@ -215,7 +215,7 @@
}
static void ssmpingd_sendto(struct ssmpingd_sock *ss,
- const char *buf,
+ const uint8_t *buf,
int len,
struct sockaddr_in to)
{
@@ -250,7 +250,7 @@
socklen_t fromlen = sizeof(from);
socklen_t tolen = sizeof(to);
int ifindex = -1;
- char buf[1000];
+ uint8_t buf[1000];
int len;
++ss->requests;
diff --git a/pimd/pim_tlv.c b/pimd/pim_tlv.c
index cb6b654..4ce9a3d 100644
--- a/pimd/pim_tlv.c
+++ b/pimd/pim_tlv.c
@@ -31,10 +31,10 @@
#include "pim_str.h"
#include "pim_msg.h"
-char *pim_tlv_append_uint16(uint8_t *buf,
- const uint8_t *buf_pastend,
- uint16_t option_type,
- uint16_t option_value)
+uint8_t *pim_tlv_append_uint16(uint8_t *buf,
+ const uint8_t *buf_pastend,
+ uint16_t option_type,
+ uint16_t option_value)
{
uint16_t option_len = 2;
@@ -55,11 +55,11 @@
return buf;
}
-char *pim_tlv_append_2uint16(uint8_t *buf,
- const uint8_t *buf_pastend,
- uint16_t option_type,
- uint16_t option_value1,
- uint16_t option_value2)
+uint8_t *pim_tlv_append_2uint16(uint8_t *buf,
+ const uint8_t *buf_pastend,
+ uint16_t option_type,
+ uint16_t option_value1,
+ uint16_t option_value2)
{
uint16_t option_len = 4;
@@ -82,10 +82,10 @@
return buf;
}
-char *pim_tlv_append_uint32(uint8_t *buf,
- const uint8_t *buf_pastend,
- uint16_t option_type,
- uint32_t option_value)
+uint8_t *pim_tlv_append_uint32(uint8_t *buf,
+ const uint8_t *buf_pastend,
+ uint16_t option_type,
+ uint32_t option_value)
{
uint16_t option_len = 4;
@@ -108,9 +108,9 @@
#define ucast_ipv4_encoding_len (2 + sizeof(struct in_addr))
-char *pim_tlv_append_addrlist_ucast(uint8_t *buf,
- const uint8_t *buf_pastend,
- struct list *ifconnected)
+uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf,
+ const uint8_t *buf_pastend,
+ struct list *ifconnected)
{
struct listnode *node;
uint16_t option_len = 0;
@@ -243,7 +243,7 @@
pim_hello_options *hello_options,
uint16_t *hello_option_holdtime,
uint16_t option_len,
- const char *tlv_curr)
+ const uint8_t *tlv_curr)
{
const char *label = "holdtime";
@@ -271,7 +271,7 @@
uint16_t *hello_option_propagation_delay,
uint16_t *hello_option_override_interval,
uint16_t option_len,
- const char *tlv_curr)
+ const uint8_t *tlv_curr)
{
if (check_tlv_length(__PRETTY_FUNCTION__, "lan_prune_delay",
ifname, src_addr,
@@ -305,7 +305,7 @@
pim_hello_options *hello_options,
uint32_t *hello_option_dr_priority,
uint16_t option_len,
- const char *tlv_curr)
+ const uint8_t *tlv_curr)
{
const char *label = "dr_priority";
@@ -332,7 +332,7 @@
pim_hello_options *hello_options,
uint32_t *hello_option_generation_id,
uint16_t option_len,
- const char *tlv_curr)
+ const uint8_t *tlv_curr)
{
const char *label = "generation_id";
@@ -357,12 +357,12 @@
int pim_parse_addr_ucast(const char *ifname, struct in_addr src_addr,
struct prefix *p,
- const char *buf,
+ const uint8_t *buf,
int buf_size)
{
const int ucast_encoding_min_len = 3; /* 1 family + 1 type + 1 addr */
- const char *addr;
- const char *pastend;
+ const uint8_t *addr;
+ const uint8_t *pastend;
int family;
int type;
@@ -379,10 +379,8 @@
addr = buf;
pastend = buf + buf_size;
- family = *(const uint8_t *) addr;
- ++addr;
- type = *(const uint8_t *) addr;
- ++addr;
+ family = *addr++;
+ type = *addr++;
switch (family) {
case PIM_MSG_ADDRESS_FAMILY_IPV4:
@@ -426,12 +424,12 @@
int pim_parse_addr_group(const char *ifname, struct in_addr src_addr,
struct prefix *p,
- const char *buf,
+ const uint8_t *buf,
int buf_size)
{
const int grp_encoding_min_len = 4; /* 1 family + 1 type + 1 reserved + 1 addr */
- const char *addr;
- const char *pastend;
+ const uint8_t *addr;
+ const uint8_t *pastend;
int family;
int type;
int mask_len;
@@ -449,13 +447,11 @@
addr = buf;
pastend = buf + buf_size;
- family = *(const uint8_t *) addr;
- ++addr;
- type = *(const uint8_t *) addr;
+ family = *addr++;
+ type = *addr++;
++addr;
++addr; /* skip b_reserved_z fields */
- mask_len = *(const uint8_t *) addr;
- ++addr;
+ mask_len = *addr++;
switch (family) {
case PIM_MSG_ADDRESS_FAMILY_IPV4:
@@ -503,12 +499,12 @@
struct in_addr src_addr,
struct prefix *p,
uint8_t *flags,
- const char *buf,
+ const uint8_t *buf,
int buf_size)
{
const int src_encoding_min_len = 4; /* 1 family + 1 type + 1 reserved + 1 addr */
- const char *addr;
- const char *pastend;
+ const uint8_t *addr;
+ const uint8_t *pastend;
int family;
int type;
int mask_len;
@@ -526,14 +522,10 @@
addr = buf;
pastend = buf + buf_size;
- family = *(const uint8_t *) addr;
- ++addr;
- type = *(const uint8_t *) addr;
- ++addr;
- *flags = *(const uint8_t *) addr;
- ++addr;
- mask_len = *(const uint8_t *) addr;
- ++addr;
+ family = *addr++;
+ type = *addr++;
+ *flags = *addr++;
+ mask_len = *addr++;
switch (family) {
case PIM_MSG_ADDRESS_FAMILY_IPV4:
@@ -607,10 +599,10 @@
pim_hello_options *hello_options,
struct list **hello_option_addr_list,
uint16_t option_len,
- const char *tlv_curr)
+ const uint8_t *tlv_curr)
{
- const char *addr;
- const char *pastend;
+ const uint8_t *addr;
+ const uint8_t *pastend;
zassert(hello_option_addr_list);
diff --git a/pimd/pim_tlv.h b/pimd/pim_tlv.h
index 5ec3dc4..b802cf8 100644
--- a/pimd/pim_tlv.h
+++ b/pimd/pim_tlv.h
@@ -71,63 +71,63 @@
#define PIM_TLV_MIN_SIZE (PIM_TLV_TYPE_SIZE + PIM_TLV_LENGTH_SIZE)
#define PIM_TLV_OPTION_SIZE(option_len) (PIM_TLV_MIN_SIZE + (option_len))
-char *pim_tlv_append_uint16(uint8_t *buf,
- const uint8_t *buf_pastend,
- uint16_t option_type,
- uint16_t option_value);
-char *pim_tlv_append_2uint16(uint8_t *buf,
- const uint8_t *buf_pastend,
- uint16_t option_type,
- uint16_t option_value1,
- uint16_t option_value2);
-char *pim_tlv_append_uint32(uint8_t *buf,
- const uint8_t *buf_pastend,
- uint16_t option_type,
- uint32_t option_value);
-char *pim_tlv_append_addrlist_ucast(uint8_t *buf,
- const uint8_t *buf_pastend,
- struct list *ifconnected);
+uint8_t *pim_tlv_append_uint16(uint8_t *buf,
+ const uint8_t *buf_pastend,
+ uint16_t option_type,
+ uint16_t option_value);
+uint8_t *pim_tlv_append_2uint16(uint8_t *buf,
+ const uint8_t *buf_pastend,
+ uint16_t option_type,
+ uint16_t option_value1,
+ uint16_t option_value2);
+uint8_t *pim_tlv_append_uint32(uint8_t *buf,
+ const uint8_t *buf_pastend,
+ uint16_t option_type,
+ uint32_t option_value);
+uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf,
+ const uint8_t *buf_pastend,
+ struct list *ifconnected);
int pim_tlv_parse_holdtime(const char *ifname, struct in_addr src_addr,
pim_hello_options *hello_options,
uint16_t *hello_option_holdtime,
uint16_t option_len,
- const char *tlv_curr);
+ const uint8_t *tlv_curr);
int pim_tlv_parse_lan_prune_delay(const char *ifname, struct in_addr src_addr,
pim_hello_options *hello_options,
uint16_t *hello_option_propagation_delay,
uint16_t *hello_option_override_interval,
uint16_t option_len,
- const char *tlv_curr);
+ const uint8_t *tlv_curr);
int pim_tlv_parse_dr_priority(const char *ifname, struct in_addr src_addr,
pim_hello_options *hello_options,
uint32_t *hello_option_dr_priority,
uint16_t option_len,
- const char *tlv_curr);
+ const uint8_t *tlv_curr);
int pim_tlv_parse_generation_id(const char *ifname, struct in_addr src_addr,
pim_hello_options *hello_options,
uint32_t *hello_option_generation_id,
uint16_t option_len,
- const char *tlv_curr);
+ const uint8_t *tlv_curr);
int pim_tlv_parse_addr_list(const char *ifname, struct in_addr src_addr,
pim_hello_options *hello_options,
struct list **hello_option_addr_list,
uint16_t option_len,
- const char *tlv_curr);
+ const uint8_t *tlv_curr);
int pim_parse_addr_ucast(const char *ifname, struct in_addr src_addr,
struct prefix *p,
- const char *buf,
+ const uint8_t *buf,
int buf_size);
int pim_parse_addr_group(const char *ifname, struct in_addr src_addr,
struct prefix *p,
- const char *buf,
+ const uint8_t *buf,
int buf_size);
int pim_parse_addr_source(const char *ifname,
struct in_addr src_addr,
struct prefix *p,
uint8_t *flags,
- const char *buf,
+ const uint8_t *buf,
int buf_size);
#endif /* PIM_TLV_H */