#ifndef _screen_actions_h_
#define _screen_actions_h_
/*
 * things to do with a packet
 */

#pragma ident "@(#)screen_actions.h	3.3 98/12/09 Sun Microsystems"

enum screen_actions {
  action_pass = 0,
  action_drop,
  action_match,
  action_is_broadcast_dst,
  action_is_unreserved,
  action_tcp_type,
  action_default_fail,
  action_udp_type,
  action_udp_lookup,
  action_ip_type,
  action_ip_lookup,
  action_icmp_type,
  action_portmap_program,
  action_portmap_lookup,
  action_time_check,
  /* Values above 100 are for forward/reverse actions */
  action_fwd = 100,
  action_rev = 101, 
  /*
   * Values in the range of 9500 to 9899 are reserved for actions
   * implementing part of the language primitives and services.
   */
  action_TodIsCorrect = 9500,
  action_TodInRange = 9501,

  /*
   * Values in the range of 9900 -- 9999 are reserved for debugging actions.
   */
  action_returnval = 9996,
  action_print = 9997,
  action_success = 9998,
  action_failure = 9999
};

enum screen_pcb_vals {
	pcb_in_interface = 1,
	pcb_out_interface,
	pcb_need_checksum,
	pcb_was_requeued,
	pcb_packet_length,
/*	pcb_alert_reason,*/
	pcb_log_reason,
/*	pcb_need_eaddr,*/
	pcb_boxid,
	pcb_max_val
};


/* bit masks for packet_load and packet_store and the @ pfl operator */
#define MATCHMASK_1BIT	0x0000000000000001
#define MATCHMASK_4BIT	0x000000000000000F
#define MATCHMASK_1BYTE	0x00000000000000FF
#define MATCHMASK_2BYTE 0x000000000000FFFF
#define MATCHMASK_4BYTE 0x00000000FFFFFFFF
#define MATCHMASK_6BYTE 0x0000FFFFFFFFFFFF
#define OLDMASK_BIT0	0x0100000000000000
#define OLDMASK_BIT1	0x0200000000000000
#define OLDMASK_BIT2	0x0400000000000000
#define OLDMASK_BIT3	0x0800000000000000
#define OLDMASK_BIT4	0x1000000000000000
#define OLDMASK_BIT5	0x2000000000000000
#define OLDMASK_BIT6	0x4000000000000000
#define OLDMASK_BIT7	0x8000000000000000
#define OLDMASK_4BIT	0x0F00000000000000
#define OLDMASK_1BYTE	0xFF00000000000000
#define OLDMASK_2BYTE	0xFFFF000000000000
#define OLDMASK_4BYTE	0xFFFFFFFF00000000
#define OLDMASK_6BYTE	0xFFFFFFFFFFFF0000


#ifdef ICGPFL
action fwd = action_fwd;	
action rev = action_rev;	
action pass = action_pass;
action drop = action_drop;
action default_fail = action_default_fail;

action tcp_type = action_tcp_type;			/* none */

action udp_lookup = action_udp_lookup;			/* none */
action udp_type = action_udp_type;			/* none */

action ip_lookup = action_ip_lookup;			/* none */
action ip_type = action_ip_type;			/* none */

action icmp_type = action_icmp_type;			/* none */

action portmap_program = action_portmap_program;	/* none */
action portmap_lookup = action_portmap_lookup;		/* none */

action time_check = action_time_check;			/* time_object_number */

action match = action_match;				/* value index */
action is_broadcast_dst = action_is_broadcast_dst;	/* none */
action is_unreserved = action_is_unreserved;		/* port */

action TodIsCorrect = action_TodIsCorrect;
action TodInRange = action_TodInRange;

action returnval = action_returnval;
action print = action_print;
action success = action_success;
action failure = action_failure;
#endif
#endif
