/[dynamips]/trunk/hv_vm.c
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/hv_vm.c

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

upstream/dynamips-0.2.6-RC4/hv_vm.c revision 5 by dpavlin, Sat Oct 6 16:08:03 2007 UTC upstream/dynamips-0.2.6-RC5/hv_vm.c revision 6 by dpavlin, Sat Oct 6 16:09:07 2007 UTC
# Line 635  static int cmd_vm_list(hypervisor_conn_t Line 635  static int cmd_vm_list(hypervisor_conn_t
635     return(0);     return(0);
636  }  }
637    
638    /* Show console TCP port info about VM object */
639    static void cmd_show_vm_list_con_ports(registry_entry_t *entry,void *opt,
640                                           int *err)
641    {
642       hypervisor_conn_t *conn = opt;
643       vm_instance_t *vm = entry->data;
644    
645       if (vm->vtty_con_type == VTTY_TYPE_TCP)
646          hypervisor_send_reply(conn,HSC_INFO_MSG,0,"%s (%d)",
647                                vm->name,vm->vtty_con_tcp_port);
648    }
649    
650    /* VM console TCP port list */
651    static int cmd_vm_list_con_ports(hypervisor_conn_t *conn,int argc,char *argv[])
652    {
653       int err = 0;
654       registry_foreach_type(OBJ_TYPE_VM,cmd_show_vm_list_con_ports,conn,&err);
655       hypervisor_send_reply(conn,HSC_INFO_OK,1,"OK");
656       return(0);
657    }
658    
659  /* VM commands */  /* VM commands */
660  static hypervisor_cmd_t vm_cmd_array[] = {  static hypervisor_cmd_t vm_cmd_array[] = {
661     { "set_debug_level", 2, 2, cmd_set_debug_level, NULL },     { "set_debug_level", 2, 2, cmd_set_debug_level, NULL },
# Line 667  static hypervisor_cmd_t vm_cmd_array[] = Line 688  static hypervisor_cmd_t vm_cmd_array[] =
688     { "send_con_msg", 2, 2, cmd_send_con_msg, NULL },     { "send_con_msg", 2, 2, cmd_send_con_msg, NULL },
689     { "send_aux_msg", 2, 2, cmd_send_aux_msg, NULL },     { "send_aux_msg", 2, 2, cmd_send_aux_msg, NULL },
690     { "list", 0, 0, cmd_vm_list, NULL },     { "list", 0, 0, cmd_vm_list, NULL },
691       { "list_con_ports", 0, 0, cmd_vm_list_con_ports, NULL },
692     { NULL, -1, -1, NULL, NULL },     { NULL, -1, -1, NULL, NULL },
693  };  };
694    

Legend:
Removed from v.5  
changed lines
  Added in v.6

  ViewVC Help
Powered by ViewVC 1.1.26