/[dynamips]/trunk/hypervisor.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/hypervisor.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.7/hypervisor.h revision 10 by dpavlin, Sat Oct 6 16:29:14 2007 UTC upstream/dynamips-0.2.8-RC1/hypervisor.h revision 11 by dpavlin, Sat Oct 6 16:33:40 2007 UTC
# Line 35  Line 35 
35  #define HSC_ERR_FILE        211  /* file error */  #define HSC_ERR_FILE        211  /* file error */
36  #define HSC_ERR_BAD_OBJ     212  /* Bad object */  #define HSC_ERR_BAD_OBJ     212  /* Bad object */
37    
 /* Hypervisor connection */  
38  typedef struct hypervisor_conn hypervisor_conn_t;  typedef struct hypervisor_conn hypervisor_conn_t;
39    typedef struct hypervisor_cmd hypervisor_cmd_t;
40    typedef struct hypervisor_module hypervisor_module_t;
41    
42    /* Hypervisor connection */
43  struct hypervisor_conn {  struct hypervisor_conn {
44     pthread_t tid;        /* Thread identifier */     pthread_t tid;                    /* Thread identifier */
45     volatile int active;  /* Connection is active ? */     volatile int active;              /* Connection is active ? */
46     int client_fd;        /* Client FD */     int client_fd;                    /* Client FD */
47     FILE *in,*out;        /* I/O buffered streams */     FILE *in,*out;                    /* I/O buffered streams */
48       hypervisor_module_t *cur_module;  /* Module of current command */
49     hypervisor_conn_t *next,**pprev;     hypervisor_conn_t *next,**pprev;
50  };  };
51    
# Line 50  typedef int (*hypervisor_cmd_handler)(hy Line 54  typedef int (*hypervisor_cmd_handler)(hy
54                                        char *argv[]);                                        char *argv[]);
55    
56  /* Hypervisor command */  /* Hypervisor command */
 typedef struct hypervisor_cmd hypervisor_cmd_t;  
57  struct hypervisor_cmd {  struct hypervisor_cmd {
58     char *name;     char *name;
59     int min_param,max_param;     int min_param,max_param;
# Line 59  struct hypervisor_cmd { Line 62  struct hypervisor_cmd {
62  };  };
63    
64  /* Hypervisor module */  /* Hypervisor module */
 typedef struct hypervisor_module hypervisor_module_t;  
65  struct hypervisor_module {  struct hypervisor_module {
66     char *name;     char *name;
67       void *opt;
68     hypervisor_cmd_t *cmd_list;     hypervisor_cmd_t *cmd_list;
69     hypervisor_module_t *next;     hypervisor_module_t *next;
70  };  };
# Line 87  extern int hypervisor_vm_init(void); Line 90  extern int hypervisor_vm_init(void);
90  /* Hypervisor VM debugging initialization */  /* Hypervisor VM debugging initialization */
91  extern int hypervisor_vm_debug_init(void);  extern int hypervisor_vm_debug_init(void);
92    
 /* Hypervisor C7200 initialization */  
 extern int hypervisor_c7200_init(void);  
   
 /* Hypervisor C3600 initialization */  
 extern int hypervisor_c3600_init(void);  
   
 /* Hypervisor C2691 initialization */  
 extern int hypervisor_c2691_init(void);  
   
 /* Hypervisor C3725 initialization */  
 extern int hypervisor_c3725_init(void);  
   
 /* Hypervisor C3745 initialization */  
 extern int hypervisor_c3745_init(void);  
   
 /* Hypervisor C2600 initialization */  
 extern int hypervisor_c2600_init(void);  
   
93  /* Send a reply */  /* Send a reply */
94  int hypervisor_send_reply(hypervisor_conn_t *conn,int code,int done,  int hypervisor_send_reply(hypervisor_conn_t *conn,int code,int done,
95                            char *format,...);                            char *format,...);
# Line 119  hypervisor_cmd_t *hypervisor_find_cmd(hy Line 104  hypervisor_cmd_t *hypervisor_find_cmd(hy
104  void *hypervisor_find_object(hypervisor_conn_t *conn,char *name,int obj_type);  void *hypervisor_find_object(hypervisor_conn_t *conn,char *name,int obj_type);
105    
106  /* Find a VM in the registry */  /* Find a VM in the registry */
107  void *hypervisor_find_vm(hypervisor_conn_t *conn,char *name,int vm_type);  void *hypervisor_find_vm(hypervisor_conn_t *conn,char *name);
108    
109  /* Register a module */  /* Register a module */
110  hypervisor_module_t *hypervisor_register_module(char *name);  hypervisor_module_t *hypervisor_register_module(char *name,void *opt);
111    
112  /* Register a list of commands */  /* Register a list of commands */
113  int hypervisor_register_cmd_list(hypervisor_module_t *module,  int hypervisor_register_cmd_list(hypervisor_module_t *module,
# Line 136  int hypervisor_register_cmd_array(hyperv Line 121  int hypervisor_register_cmd_array(hyperv
121  int hypervisor_stopsig(void);  int hypervisor_stopsig(void);
122    
123  /* Hypervisor TCP server */  /* Hypervisor TCP server */
124  int hypervisor_tcp_server(int tcp_port);  int hypervisor_tcp_server(char *ip_addr,int tcp_port);
125    
126  #endif  #endif

Legend:
Removed from v.10  
changed lines
  Added in v.11

  ViewVC Help
Powered by ViewVC 1.1.26