Picon

[PATCH] Dump traffic to pcap file - update

Hello all.

Attached you find an updated version of my patch to dump the traffic on a given interface to a tcpdump file.
The changes are:

-moved from f* functions (fopen, fwrite) to the more basic functions (open, write, etc) because this seems
to be the norm in the source code
-fixed some formatting mistakes
-modified the help (which is printed out when qemu is excuted with no parameters) to display the new option
-made the code more portable (by using the types uint32_t, etc)
-added the code to properly close the files when qemu is shut down

Before anyone asks :), no endianess conversion needs to be applied to the things written to the file,
because it is specified that the reader shall detect the endianess of the file based on the signature in the header.

Best wishes

		
___________________________________________________________ 
All New Yahoo! Mail – Tired of unwanted email come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html
Attachment (dump_traffic_to_pcap.diff): text/x-patch, 6255 bytes
Picon

[PATCH] Macaddr parsing

Hello all.

Attached is an other patch (against the CVS) to allow for more flexible mac address parsing from the command
line. Specifically it allows:

-using the '-' as separator (as Windows uses it)
-using no separator at all (just 12 hexadecimal characters in a row) - again Windows uses this style in some
configuration dialogs
-using an offset from the default address (like +2 or -10). This is useful for quickly bringing up a virtual
lan without having to remember the base macaddr, you just specify different offsets (an other option
would be to use mac addresses like 12:34:56:78:9A:BC which are easy to remember, however I found that
WinXP for example does not react well - duplicate packets, no conectivity at the IP level although the ARP
level is fine, etc - if the OUI - the first 3 bytes of the mac address - is incorrect)

Also, there was a suggestion on the list some time ago to use the crc of the path to the disk image as part of the
macaddr to ensure uniqueness. If people feel that this would be useful, I'm happy to provide a patch.

Best regards

      ___________________________________________________________ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today
http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 
Attachment (parse_macaddr.diff): text/x-patch, 3307 bytes
andrzej zaborowski | 1 Jul 14:29 2007
Picon

Re: Porting QEMU to PalmOS

On 5/24/07, sinisa marovic <sinisamarovic <at> yahoo.com> wrote:
> I'm afraid I will have to dissapoint you: it will be only isapc with no
> networking or other fancy devices. Main goal is the ability to run dos games.
> I do not know how familiar are you with PalmOS developer support. It
> is poor, gcc lack many important functions that have to be written from
> scratch. When I ported dosbox (which is written in c++)

(Happily violating the GPL)

Will the qemu port also be binary only?

Sorry for being off-topic.
Regards

Anthony Liguori | 1 Jul 17:33 2007

Re: [PATCH] starting qemu vnc session on a pre-allocated port

Gilad Ben-Yossef wrote:
> Anthony Liguori wrote:
>
>>> The machine running qemu has a web based interface to start VMs.
>>> A user asks for a new VM to start by browsing to a URL. The CGI
>>> implmenting that URL will start a new qemu instance, send to the user
>>> web browser an HTML page with a JAVA VNC viewer embedded and terminate.
>>
>> Passing an fd is still the wrong solution due to the problems with 
>> save/restore/migrate.
>
> There is no problem with save/restore or migration.
>
> For save/restore, the fd is not saved in the saved state. You need to 
> specify a (new?) fd when you restore, if that is what you want to do, 
> that is.
>
> It just like I can run a VM with SDL, save the state and restore it 
> with VNC - the question if the restored session should use the same fd 
> (for whatever definition of "the same" you want) or not is left for 
> the user. We should be providing mechanism, not policy.
>
> The same applies for migration - when you migrate your VM, its your 
> call and responsibility to do the right thing. Just spawn a wrapper on 
> the target machine that opens a new fd and exec into qemu and use 
> *that* as your migrate command line argument instead of plain qemu, as 
> an obvious example.
>
> As someone wrote in their blog (this is why I write my blog in a 
> language that's been dead for aprox. 2000 years... :-):
(Continue reading)

Luke-Jr | 1 Jul 19:20 2007

Re: Porting QEMU to PalmOS

On Sunday 01 July 2007 07:29, andrzej zaborowski wrote:
> On 5/24/07, sinisa marovic <sinisamarovic <at> yahoo.com> wrote:
> > I'm afraid I will have to dissapoint you: it will be only isapc with no
> > networking or other fancy devices. Main goal is the ability to run dos
> > games. I do not know how familiar are you with PalmOS developer support.
> > It is poor, gcc lack many important functions that have to be written
> > from scratch. When I ported dosbox (which is written in c++)
>
> (Happily violating the GPL)
>
> Will the qemu port also be binary only?

What did he say that violates the GPL? Just because he is only porting the 
isapc stuff? I don't know any part of the GPL saying "when you port this, you 
must port all the features"... Or would such a port be inherently a violation 
due to system libraries being incompatible with the [L]GPL?

Stefan Weil | 1 Jul 19:29 2007
Picon

Re: qemu exec.c monitor.c

ANSI / POSIX do not define "wa" as mode string for fopen.
I have no idea how many implementations of libc
will fail with this mode which was introduced by
the latest version of exec.c.

The standard mode for append is just "a".
Even better (because it is faster and creates smaller
log files for Windows) is "ab" for append and "wb"
otherwise.

Stefan

Paul Brook schrieb:
> CVSROOT: /sources/qemu
> Module name: qemu
> Changes by: Paul Brook <pbrook> 07/06/30 13:53:24
>
> Modified files:
> . : exec.c monitor.c
>
> Log message:
> Allow changing log filename.
> Close logfile when logging is disabled.

Johannes Schindelin | 1 Jul 20:08 2007
Picon
Picon

Re: Porting QEMU to PalmOS

Hi,

On Sun, 1 Jul 2007, Luke-Jr wrote:

> On Sunday 01 July 2007 07:29, andrzej zaborowski wrote:
> > On 5/24/07, sinisa marovic <sinisamarovic <at> yahoo.com> wrote:
> >
> > > [...] When I ported dosbox (which is written in c++)
> >
> > (Happily violating the GPL)
> >
> > Will the qemu port also be binary only?
> 
> What did he say that violates the GPL?

I think he was talking about dosbox. And expressing an implicit interest 
that whatever will be ported from qemu be handled differently.

Ciao,
Dscho

Blue Swirl | 1 Jul 20:08 2007
Picon

Re: [PATCH] Dump traffic to pcap file - update

On 7/1/07, Balazs Attila-Mihaly (Cd-MaN) <x_at_y_or_z <at> yahoo.com> wrote:
> Attached you find an updated version of my patch to dump the traffic on a given interface to a tcpdump file.
The changes are:

This part is not right:
+void pcap_close_files()
+{
+	int i;
+	for (i = 0; i <= nb_nics; i++)
<= should be <.

andrzej zaborowski | 1 Jul 20:16 2007
Picon

Re: Porting QEMU to PalmOS

On 01/07/07, Luke-Jr <luke <at> dashjr.org> wrote:
> On Sunday 01 July 2007 07:29, andrzej zaborowski wrote:
> > On 5/24/07, sinisa marovic <sinisamarovic <at> yahoo.com> wrote:
> > > I'm afraid I will have to dissapoint you: it will be only isapc with no
> > > networking or other fancy devices. Main goal is the ability to run dos
> > > games. I do not know how familiar are you with PalmOS developer support.
> > > It is poor, gcc lack many important functions that have to be written
> > > from scratch. When I ported dosbox (which is written in c++)
Referring to this sentence ^
> >
> > (Happily violating the GPL)
> >
> > Will the qemu port also be binary only?
>
> What did he say that violates the GPL? Just because he is only porting the
> isapc stuff? I don't know any part of the GPL saying "when you port this, you
> must port all the features"... Or would such a port be inherently a violation
> due to system libraries being incompatible with the [L]GPL?

Releasing the dosbox PalmOS binary and not releasing the sources even
when explicitly asked to is a violation of GPL and of the policy of
sourceforge.net and a couple of other websites on which the binary
appears.

Regards

Paul Brook | 1 Jul 20:21 2007

qemu exec.c

CVSROOT:	/sources/qemu
Module name:	qemu
Changes by:	Paul Brook <pbrook>	07/07/01 18:21:11

Modified files:
	.              : exec.c 

Log message:
	Fix bogus fopen mode.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/exec.c?cvsroot=qemu&r1=1.102&r2=1.103


Gmane