From: Gerd Hoffmann <kraxel@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH 4/8] VNC: Add 'family' key
Date: Fri, 15 Jan 2010 08:54:56 +0100 [thread overview]
Message-ID: <4B501F50.3080802@redhat.com> (raw)
In-Reply-To: <1263487859-6318-5-git-send-email-lcapitulino@redhat.com>
> +static QString *get_sock_family(const struct sockaddr_storage *sa)
> +{
> + const char *name;
> +
> + switch (sa->ss_family)
> + {
> + case AF_INET:
> + name = "ipv4";
> + break;
> + case AF_INET6:
> + name = "ipv6";
> + break;
> + default:
> + name = "unknown";
> + break;
> + }
> +
> + return qstring_from_str(name);
> +}
qemu-socket has inet_strfamily() already. You might want to un-static
that one, then simply do
return qstring_from_str(inet_strfamily(sa->ss_family));
cheers,
Gerd
next prev parent reply other threads:[~2010-01-15 7:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 16:50 [Qemu-devel] [PATCH v0 0/8]: VNC events and cleanup Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 1/8] VNC: Use 'enabled' key instead of 'status' Luiz Capitulino
2010-01-19 22:39 ` Anthony Liguori
2010-01-14 16:50 ` [Qemu-devel] [PATCH 2/8] VNC: Make 'auth' key mandatory Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 3/8] VNC: Rename client's 'username' key Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 4/8] VNC: Add 'family' key Luiz Capitulino
2010-01-15 7:54 ` Gerd Hoffmann [this message]
2010-01-15 11:54 ` Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 5/8] VNC: Cache client info at connection time Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 6/8] QMP: Introduce VNC_CONNECTED event Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 7/8] QMP: Introduce VNC_DISCONNECTED event Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 8/8] QMP: Introduce VNC_INITIALIZED event Luiz Capitulino
2010-01-14 17:32 ` [Qemu-devel] Re: [PATCH v0 0/8]: VNC events and cleanup Daniel P. Berrange
2010-01-14 19:01 ` Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B501F50.3080802@redhat.com \
--to=kraxel@redhat.com \
--cc=armbru@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).