   OFPAT_SET_FIELD_ETH_SRC BOOLEAN
 );
 
--- create a session table
-CREATE TABLE session
-(
-  id SERIAL PRIMARY KEY,                              -- internal sesison id
-  subscriber_id INTEGER references subscriber(id) NOT NULL,   -- reference to sub
-  key CHAR(36) NOT NULL UNIQUE,                       -- session key for API
-  -- begin_time TIMESTAMP WITH TIME ZONE NOT NULL,       -- date/time session began
-  timeout BIGINT /*NOT NULL,*/     -- date/time for session to end
-  -- ip INET NOT NULL                                    -- ip used for session
-);
-
+CREATE TABLE packet
+(
+  id SERIAL PRIMARY KEY,
+  subscriber_id INTEGER references subscriber(id) NOT NULL,
+  name CHAR(60) NOT NULL
+);
+

  vp_local BOOLEAN,
  vp_normal BOOLEAN,
  vp_flood BOOLEAN
);

CREATE TABLE ft_caps
(
	id SERIAL PRIMARY KEY,
	dp_id INTEGER references dp_caps(id) NOT NULL,
  table_id INTEGER,
  max_entries INTEGER
);

CREATE TABLE match_caps

  -- status_date TIMESTAMP WITH TIME ZONE NOT NULL,  -- date of last change in disp
);

-- create a session table
CREATE TABLE session
(
  id SERIAL PRIMARY KEY,                              -- internal sesison id
  subscriber_id INTEGER references subscriber(id) NOT NULL,   -- reference to sub
  key CHAR(36) NOT NULL UNIQUE,                       -- session key for API
  -- begin_time TIMESTAMP WITH TIME ZONE NOT NULL,       -- date/time session began
  timeout BIGINT /*NOT NULL,*/     -- date/time for session to end
  -- ip INET NOT NULL                                    -- ip used for session
);

--SWITCH PROFILE ---------------------------------------------------------------
CREATE TABLE switch_profile
(
  id SERIAL PRIMARY KEY,
  /*
   * Subscriber Id 
   * A subscriber can have many profiles
   * A profile can only belong to one subscriber
   */ 
  subscriber_id INTEGER references subscriber(id) NOT NULL,

  /*
   * Profile name
   */
  name VARCHAR(60) NOT NULL
);

-- Data path capabilities --
CREATE TABLE dp_caps
(
	id SERIAL PRIMARY KEY,

  /* 
   * Profile Id 
   * A switch can only have a single datapath id
   */
  profile_id INTEGER references switch_profile(id) NOT NULL,
  
  /*
   * Datapath Id - 
   *  Lower 48 bits for switch mac address
   *  Upper 16 bits are implementer defined
   */ 
  datapath_id CHAR(8),

  /*
   * Number of buffers
   * maximum number of of packets the switch can buffer when sending
   * packets to the controller using packet-in messages
   * (cut or keep?)
   */
  no_buffers INTEGER NOT NULL,

  /*
   * Number of Flowtables in switch data plane
   * 1.0 has only only 1 table
   * 1.1 - 1.4 can have multiple tables
   */
  no_tables INTEGER NOT NULL, 

  /* 
   * Supported Capabilities - 
   *   Flow Stats   -  1.0, 1.1, 1.2, 1.3, 1.4 
   *   Table Stats  -  1.0, 1.1, 1.2, 1.3, 1.4
   *   Port Stats   -  1.0, 1.1, 1.2, 1.3, 1.4
   *   Group Stats  -  1.1, 1.2, 1.3, 1.4
   *   IP_Reassem   -  1.0, 1.1, 1.2, 1.3, 1.4
   *   Queue Stats  -  1.0, 1.1, 1.2, 1.3, 1.4
   *   Port Blocked -  1.2, 1.3, 1.4
   */
   ofpc_flow_stats BOOLEAN,
   ofpc_table_stats BOOLEAN,
   ofpc_port_stats BOOLEAN,
   ofpc_group_stats BOOLEAN,
   ofpc_ip_reasm BOOLEAN,
   ofpc_port_bocked BOOLEAN,

  /*
   * Supported Virtual Ports
   *  (Req) All - 1.0
   *  (R) Controller - 1.0
   *  (R) Table - 1.0
   *  (R) In_Port - 1.0
   *  (R) Any - 1.2, 1.3, 1.4
   *  Local - 1.0 (R), 1.1 (O), 1.2(O), 1.3(O), 1.4(O)
   *  (O) Normal - 1.1, 1.2, 1.3, 1.4
   *  (O) Flood - 1.1, 1.2, 1.3, 1.4
   */ 
	vp_all BOOLEAN, 
  vp_controller BOOLEAN, 
  vp_table BOOLEAN,
