{
 superclass => 'lvs_msg',	# root name for our messages
 
 types =>
 {
  'string' =>                    
  { cpp => 'char *', 
    c => 'char *',  
    read => 'read_string', 
    write => 'write_string' 
  }, 
  
  'int' =>                    
  { cpp => 'int', 
    c => 'int',  
    read => 'read_int', 
    write => 'write_int' 
  }, 

  'float array' =>                    
  { cpp => 'float *', 
    c => 'float *',  
    read => 'read_float_array', 
    write => 'write_float_array' 
  }, 
 },

 messages =>
 {
  hello =>
  {
   fields => {config_hash => {type => 'string'},
	      ip => {type => 'string'},},
   comments => 'broadcast from each lvsd on startup',
  },
  
  'hello response' =>
  {
   fields => {config_hash => {type => 'string'},
	      node_state => {type => 'int'},},
   comments => 'ptp resp to hello',
  },
	
  'node ip request' =>
  {
   fields => {},
  },

  'node ip' =>
  {
   fields => {ip => {type => 'string'},},
  },

  'hb' =>
  {
   fields => {seqno => {type => 'int'}},
  },

  # statistics reporting

  'list stats' =>
  {
   fields => {},
  },

  'stat count' =>
  {
   fields => {count => {type => 'int'},},
  },
  
  'stat desc' =>
  {
   fields => {name => {type => 'string'},
	      type => {type => 'string'},},
  },

  'get stat' =>
  {
   fields => {name => {type => 'string'},},
  },

  'stat' => 
  {
   fields => {name => {type => 'string'},
	      values => {type => 'float array'},},
  },
   
  # status indicator messages

  'node status' =>
  { 
   fields => {node => {type => 'string'},
	      status => {type => 'int'},},
  },

  'realserver status' =>
  {
   fields => {vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      node => {type => 'string'},
	      status => {type => 'int'},},
  },

  'vip status' =>
  {
   fields => {vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      status => {type => 'int'},}, # not so sure about this one
  },

  # config copy messages

  'config copy' =>
  {
   fields => {hash => {type => 'string',},},
  },

  'config copy ack' =>
  {
   fields => {hash => {type => 'string'},
	      ok => {type => 'int'},},
  },

  'config main' =>
  {
   fields => {cookie_timeout => {type => 'int'},
	      daemon_uid => {type => 'int'},
	      session_timeout => {type => 'int'},
	      num_vips => {type => 'int'},},
  },

  'vip main' => 
  {
   fields => {pri_dir => {type => 'string'},
	      sec_dir => {type => 'string'},
	      sched => {type => 'string'},
	      persist => {type => 'int'},
	      persist_mask => {type => 'string'},
	      port => {type => 'int'},
	      ip => {type => 'string'},
	      monitor => {type => 'string'},
	      num_realservers => {type => 'int'},
	      forwarding => {type => 'int'},
	      nat_ip => {type => 'string'},
	      nat_mask => {type => 'string'},},
  },
  
  'realserver main' =>
  {
   fields => {name => {type => 'string'},
	      forward => {type => 'int'},
	      weight => {type => 'int'},},
  },
  
  # config change control messages

  'config change' =>	
  {
   fields => {new_config_hash => {type => 'string'},},
   comments => 'sent by node when about to change config',
  },

  'config change ack' =>
  {
   fields => {hash => {type => 'string'},
	      ok => {type => 'int'},},
   comments => 'resonse to config change',
  },

  'config cancel' => 
  {
   fields => {hash => {type => 'string'},},
  },

  'config success' => 
  {
   fields => {hash => {type => 'string'},},
  },
  
  'config failure' => 
  {
   fields => {hash => {type => 'string'},
	      msg => {type => 'string'},},
  },
  
  'config complete' =>
  {
   fields => {hash => {type => 'string'},},
  },

  # specifig config changing messages

  'node add' =>
  {
   fields => {hash => {type => 'string'},
	      name => {type => 'string'},},
   comments => 'resonse to config change',
  },

  'node del' =>
  {
   fields => {hash => {type => 'string'},
	      name => {type => 'string'},},
   comments => 'resonse to config change',
  },

  'vip add' =>
  {
   fields => {hash => {type => 'string'},
	      ip => {type => 'string'},
	      port => {type => 'int'},
	      primary_dir => {type => 'string'},
	      secondary_dir => {type => 'string'},
	      forwarding => {type => 'int'},
	      nat_ip => {type => 'string'},
	      nat_mask => {type => 'string'},},
   comments => 'resonse to config change',
  },

  'vip del' =>
  {
   fields => {hash => {type => 'string'},
	      ip => {type => 'string'},
	      port => {type => 'int'},},
   comments => 'resonse to config change',
  },

  'realserver add' =>
  {
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      name => {type => 'string'},
	      weight => {type => 'int'},
	      forward => {type => 'int'},},
  },
  
  'realserver del' =>
  {
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      name => {type => 'string'},},
  },

  'vip director change' =>
  { 
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      dir_type => {type => 'string'},
	      new_dir => {type => 'string'},},
  },

  'vip sched change' =>
  { 
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      new_sched => {type => 'string'},},
  },

  'vip persist change' =>
  { 
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      new_persist => {type => 'int'},},
  },

  'vip persist mask change' =>
  { 
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      new_persist_mask => {type => 'string'},},
  },

  'vip monitor change' =>
  { 
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      new_monitor => {type => 'string'},},
  },

  'vip ip change' =>
  { 
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      new_ip => {type => 'string'},},
  },

  'vip port change' =>
  { 
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      new_port => {type => 'int'},},
  },

  'rs weight change' =>
  {
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      name => {type => 'string'},
	      weight => {type => 'int'},},
  },

  'rs forward change' =>
  {
   fields => {hash => {type => 'string'},
	      vip_ip => {type => 'string'},
	      vip_port => {type => 'int'},
	      name => {type => 'string'},
	      forward => {type => 'int'},},
  },

  'config save' =>
  {
   fields => {hash => {type => 'string'},},
  },

  'session timeout change' => 
  {
   fields => {hash => {type => 'string'},
	      timeout => {type => 'int'},},
  },

  'cookie timeout change' => 
  {
   fields => {hash => {type => 'string'},
	      timeout => {type => 'int'},},
  },

  'client port change' => 
  {
   fields => {hash => {type => 'string'},
	      port => {type => 'int'},},
  },

  'admin pw change' => 
  {
   fields => {hash => {type => 'string'},
	      new_pw => {type => 'string'},},
  },

  'stat update change' => 
  {
   fields => {hash => {type => 'string'},
	      interval => {type => 'int'},},
  },
 }
}
