Deleted Added
sdiff udiff text old ( 55505 ) new ( 62638 )
full compact
1/* $KAME$ */
2
3/*
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * $FreeBSD: head/usr.sbin/rrenumd/lexer.l 62638 2000-07-05 11:12:53Z kris $
32 */
33
34%{
35#include <sys/param.h>
36#include <sys/ioctl.h>
37#include <sys/socket.h>
38
39#include <string.h>
40
41#include <net/if.h>
42#if defined(__FreeBSD__) && __FreeBSD__ >= 3
43#include <net/if_var.h>
44#endif /* __FreeBSD__ >= 3 */
45
46#include <netinet/in.h>
47#include <netinet/in_var.h>
48#include <netinet/icmp6.h>
49
50#include <arpa/inet.h>
51
52#include "y.tab.h"
53
54int lineno = 1;
55
56#define LINEBUF_SIZE 1000
57char linebuf[LINEBUF_SIZE];
58%}
59
60/* common section */
61nl \n
62ws [ \t]+
63digit [0-9]
64letter [0-9A-Za-z]

--- 146 unchanged lines hidden (view full) ---

211 yylval.cs.len = yyleng;
212 return DECSTRING;
213 }
214{name} {
215 yylval.cs.cp = yytext;
216 yylval.cs.len = yyleng;
217 return NAME;
218 }
219{ipv4addr} {
220 memset(&yylval.addr4, 0, sizeof(struct in_addr));
221 if (inet_pton(AF_INET, yytext,
222 &yylval.addr4) == 1) {
223 return IPV4ADDR;
224 } else {
225 return ERROR;
226 }
227 }
228{ipv6addr} {
229 memset(&yylval.addr6, 0, sizeof(struct in6_addr));
230 if (inet_pton(AF_INET6, yytext,
231 &yylval.addr6) == 1) {
232 return IPV6ADDR;
233 } else {
234 return ERROR;
235 }

--- 29 unchanged lines hidden ---