<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Yes.<br>
</span></div>
<div><span>I was just thinking about that when I received your email.</span></div>
<div><span>Thanks :)</span></div>
<div><br>
  <span></span></div>
<div><span>Tho Huynh.<br></span></div>
<div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Michal Privoznik <mprivozn@redhat.com><br> <b><span style="font-weight: bold;">To:</span></b> Văn Thọ <feeliwood@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> Richard W.M. Jones <rjones@redhat.com>; libvir-list@redhat.com; libguestfs <libguestfs@redhat.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, 11 May 2012, 20:27<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [libvirt] [Libguestfs] get virtual machine`s ip address<br> </font> </div> <br>On 11.05.2012 02:29, Văn Thọ wrote:<br>> Do you have any hints or ideas about my situation ?<br>> Assuming that I'm running
 these programs in a safe environment and I don't concern about security problems.<br><br>If you are able to get the MAC belonging to the IP address you can then<br>grep /etc/libvirt/qemu/*.xml (assuming you are using qemu) for that MAC<br>address. It will return the name of the guest.<br><br>Michal<br>> <br>> Tho Huynh.<br>> <br>> On 11-05-2012, at 00:51, "Richard W.M. Jones" <<a ymailto="mailto:rjones@redhat.com" href="mailto:rjones@redhat.com">rjones@redhat.com</a>> wrote:<br>> <br>>> On Thu, May 10, 2012 at 08:24:31AM -0700, THO HUYNH wrote:<br>>>> I`m writing 2 simple socket programs: Client program runs on guest,<br>>>> server program runs on host machine.<br>>>><br>>>> The server need the dom xml name of the guest which is running the<br>>>> client program and the only information the server program has is<br>>>> the guest`s ip address. [...]  Is there another
 way to get the dom<br>>>> xml name of a guest from an ip address (if the ip address belongs to<br>>>> that guest).<br>>><br>>> CC'd to libvir-list, since this is really a libvirt question.<br>>><br>>> The trouble with the architecture you've described is that it relies<br>>> on the IP source address for authentication, one of those things you<br>>> should never do if you care about security:<br>>><br>>> <a href="https://en.wikipedia.org/wiki/IP_address_spoofing" target="_blank">https://en.wikipedia.org/wiki/IP_address_spoofing</a><br>>><br>>> Maybe because it's TCP, and it's a closed system with a firewall, you<br>>> can get away with it.<br>>><br>>> Rich.<br>>><br>>> -- <br>>> Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/%7Erjones" target="_blank">http://people.redhat.com/~rjones</a><br>>> virt-p2v
 converts physical machines to virtual machines.  Boot with a<br>>> live CD or over the network (PXE) and turn machines into Xen guests.<br>>> <a href="http://et.redhat.com/%7Erjones/virt-p2v" target="_blank">http://et.redhat.com/~rjones/virt-p2v</a><br>> <br>> --<br>> libvir-list mailing list<br>> <a ymailto="mailto:libvir-list@redhat.com" href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a><br>> <a href="https://www.redhat.com/mailman/listinfo/libvir-list" target="_blank">https://www.redhat.com/mailman/listinfo/libvir-list</a><br><br><br><br> </div> </div>  </div></body></html>