{ 0, NULL },
};
+#define AS_STR_SIZE sizeof("xxxxx.xxxxx")
+
/*
* as_printf
*
static char rd[sizeof("xxxxx.xxxxx:xxxxx (xxx.xxx.xxx.xxx:xxxxx)")];
char *pos = rd;
/* allocate space for the largest possible string */
- char astostr[sizeof("xxxxx.xxxxx")];
+ char astostr[AS_STR_SIZE];
/* ok lets load the RD format */
switch (GET_BE_U_2(pptr)) {
uint32_t i;
} bw;
/* allocate space for the largest possible string */
- char astostr[sizeof("xxxxx.xxxxx")];
+ char astostr[AS_STR_SIZE];
switch (GET_BE_U_2(pptr)) {
u_int rtc_prefix_in_hex_len = 0;
static char output[61]; /* max response string */
/* allocate space for the largest possible string */
- char astostr[sizeof("xxxxx.xxxxx")];
+ char astostr[AS_STR_SIZE];
uint16_t ec_type = 0;
u_int octet_count;
u_int i;
uint8_t route_target[8];
u_int plen;
/* allocate space for the largest possible string */
- char astostr[sizeof("xxxxx.xxxxx")];
+ char astostr[AS_STR_SIZE];
u_int num_octets;
/* NLRI "prefix length" from RFC 2858 Section 4. */
const u_char *pptr, char *buf, size_t buflen)
{
/* allocate space for the largest possible string */
- char astostr[sizeof("xxxxx.xxxxx")];
+ char astostr[AS_STR_SIZE];
uint8_t route_type, route_length;
u_int addr_length, sg_length;
u_int offset;
const unsigned attr_set_level)
{
/* allocate space for the largest possible string */
- char astostr[sizeof("xxxxx.xxxxx")];
+ char astostr[AS_STR_SIZE];
u_int i;
uint16_t af;
uint8_t safi, snpa, nhlen;
const u_char *opt, u_int caps_len)
{
/* allocate space for the largest possible string */
- char astostr[sizeof("xxxxx.xxxxx")];
+ char astostr[AS_STR_SIZE];
u_int cap_type, cap_len, tcap_len, cap_offset;
u_int i = 0;
const u_char *dat, u_int length)
{
/* allocate space for the largest possible string */
- char astostr[sizeof("xxxxx.xxxxx")];
+ char astostr[AS_STR_SIZE];
const struct bgp_open *bgp_open_header;
u_int optslen;
const struct bgp_opt *bgpopt;