-/* $OpenBSD: bgpctl.c,v 1.177 2015/02/11 23:47:25 phessler Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.178 2015/04/17 07:51:09 phessler Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
void network_bulk(struct parse_result *);
const char *print_auth_method(enum auth_method);
-/* parser.c */
-int parse_prefix(const char *, struct bgpd_addr *, u_int8_t *);
-
struct imsgbuf *ibuf;
struct mrt_parser show_mrt = { show_mrt_dump, show_mrt_state, show_mrt_msg };
struct mrt_parser net_mrt = { network_mrt_dump, NULL, NULL };
if (strchr(b, '#') != NULL)
break;
bzero(&net, sizeof(net));
- parse_prefix(b, &h, &len);
+ parse_prefix(b, strlen(b), &h, &len);
memcpy(&net.prefix, &h, sizeof(h));
net.prefixlen = len;
-/* $OpenBSD: parser.c,v 1.69 2014/11/19 21:11:41 tedu Exp $ */
+/* $OpenBSD: parser.c,v 1.70 2015/04/17 07:51:09 phessler Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
const struct token []);
void show_valid_args(const struct token []);
int parse_addr(const char *, struct bgpd_addr *);
-int parse_prefix(const char *, size_t, struct bgpd_addr *,
- u_int8_t *);
int parse_asnum(const char *, size_t, u_int32_t *);
int parse_number(const char *, struct parse_result *,
enum token_type);
-/* $OpenBSD: parser.h,v 1.26 2013/10/09 08:56:38 phessler Exp $ */
+/* $OpenBSD: parser.h,v 1.27 2015/04/17 07:51:09 phessler Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
__dead void usage(void);
struct parse_result *parse(int, char *[]);
+int parse_prefix(const char *, size_t, struct bgpd_addr *,
+ u_int8_t *);