8
#include <sys/socket.h>
9
#include <netinet/in.h>
10
#include <arpa/inet.h>
12
#include <sys/resource.h>
14
#include "port/port.h"
19
void yyerror(char *c);
21
/* Prevent compilation of static input() function in generated scanner
22
code to avoid gcc 4.x `defined but not used' warnings
30
service return(T_SERVICE);
33
protocol return(T_PROTO);
38
backlog return(T_BACKLOG);
39
instances return(T_INSTANCES);
40
defaults return(T_DEFAULT);
42
rlimit return(T_RLIMIT);
43
cpu return(T_LIM_CPU);
44
fsize return(T_LIM_FSIZE);
45
data return(T_LIM_DATA);
46
stack return(T_LIM_STACK);
47
core return(T_LIM_CORE);
48
rss return(T_LIM_RSS);
49
nproc return(T_LIM_NPROC);
50
nofile return(T_LIM_NOFILE);
51
memlock return(T_LIM_MEMLOCK);
52
unlimited return(T_LIM_INFINITY);
53
interface return(T_INTERFACE);
58
chroot return(T_CHROOT);
60
syslog return(T_SYSLOG);
64
server return(T_SERVER);
65
directory return(T_DIR);
67
version return(T_VERSION);
70
capability return(T_CAPS);
71
family return(T_FAMILY);
74
initgroups return(T_INITGROUPS);
75
accept return(T_ACCEPT);
77
close return(T_CLOSE);
78
banner return(T_BANNER);
81
discard return(T_DISCARD);
82
filter return(T_FILTER);
83
chargen return(T_CHARGEN);
84
loopback return(T_LOOPBACK);
86
enabled return(T_ENABLED);
101
yylval.cp = malloc(yyleng - 1);
102
memcpy(yylval.cp, yytext + 1, yyleng - 2);
103
yylval.cp[yyleng - 2] = '\0';
106
([[:digit:]]{1,3}"."){1,3}([[:digit:]]{1,3})? {
107
yylval.cp = strdup(yytext);
111
yylval.num = strtol(yytext, NULL, 0);
115
yylval.cp = strdup(yytext);
120
rl_pwarn(curfile_name, curfile_line,
121
"unknown directive: %s", strdup(yytext));
127
yy_delete_buffer(YY_CURRENT_BUFFER);
130
void dummy() { yyunput(0, NULL); } /* shutup gcc */