%{
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
* Copyright (c) 1994, by Sun Microsytems, Inc.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
%}
%{
#include <stdio.h>
#include <string.h>
#include "set.h"
#include "cmd.h"
#include "fcn.h"
#include "list.h"
#include "expr.h"
#include "spec.h"
#include "source.h"
#include "prbk.h"
extern int yylex();
extern void help_on_topic(char *topic);
extern void help_on_command(int cmd);
extern boolean_t g_kernelmode;
extern tnfctl_handle_t *g_hndl;
extern void help(void);
extern void cmd_listtracefile();
%}
%union
{
char * strval;
void * pidlistval;
int intval;
}
%type <intval> CONTINUE DISABLE ENABLE HELP LIST QUIT SOURCE TRACE UNTRACE BUFFER KTRACE PFILTER CLEAR CONNECT command
%%
;
{
if (g_kernelmode)
prompt();
}
;
;
;
| DISABLE { $$ = $1; }
| ENABLE { $$ = $1; }
| HELP { $$ = $1; }
| LIST { $$ = $1; }
| QUIT { $$ = $1; }
| SOURCE { $$ = $1; }
| TRACE { $$ = $1; }
| UNTRACE { $$ = $1; }
| KTRACE { $$ = $1; }
| PFILTER { $$ = $1; }
| CONNECT { $$ = $1; }
;
;
{
if (!g_kernelmode) YYACCEPT;
}
;
;
{
if (cmd_p)
}
{
if (cmd_p)
}
;
{
if (cmd_p)
}
{
if (cmd_p)
}
;
{
if (cmd_p)
}
{
if (cmd_p)
}
;
{
if (cmd_p)
}
{
if (cmd_p)
}
;
{
if (cmd_p)
}
{
if (cmd_p)
}
;
{
if (cmd_p)
}
{
if (cmd_p)
}
;
;
;
;
;
;
;
;
{ prbk_set_pfilter_mode(B_TRUE); }
{ prbk_set_pfilter_mode(B_FALSE); }
{ prbk_pfilter_add($3); }
{ prbk_pfilter_drop($3); }
{ prbk_show_pfilter_mode(); }
;
{ prbk_set_tracing(B_TRUE); }
{ prbk_set_tracing(B_FALSE); }
{ prbk_show_tracing(); }
;
;
;
;
;
SPEC_EXACT), $1); }
;
;
;
;
{
}
{
extern int g_outsize;
}
{
prbk_buffer_alloc($3);
}
{
}
;
%%