aboutsummaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2011-02-24 12:22:10 +0100
committerAurelien Jarno <aurelien@aurel32.net>2011-03-06 20:06:50 +0100
commit85bb6d36b055e64778086b951ea282b383014274 (patch)
tree0ba5919ae12fae45bb4b901eb22be26c0db9e7a4 /net.c
parent0d2e91c17829729812bf5d22d20dd0f5d2554ec2 (diff)
downloadqemu-85bb6d36b055e64778086b951ea282b383014274.zip
qemu-85bb6d36b055e64778086b951ea282b383014274.tar.gz
qemu-85bb6d36b055e64778086b951ea282b383014274.tar.bz2
net: remove parse_host_src_port() function
It was deprecated, and it has no users. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'net.c')
-rw-r--r--net.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/net.c b/net.c
index 436c24c..54e8992 100644
--- a/net.c
+++ b/net.c
@@ -94,47 +94,6 @@ static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
return 0;
}
-int parse_host_src_port(struct sockaddr_in *haddr,
- struct sockaddr_in *saddr,
- const char *input_str)
-{
- char *str = qemu_strdup(input_str);
- char *host_str = str;
- char *src_str;
- const char *src_str2;
- char *ptr;
-
- /*
- * Chop off any extra arguments at the end of the string which
- * would start with a comma, then fill in the src port information
- * if it was provided else use the "any address" and "any port".
- */
- if ((ptr = strchr(str,',')))
- *ptr = '\0';
-
- if ((src_str = strchr(input_str,'@'))) {
- *src_str = '\0';
- src_str++;
- }
-
- if (parse_host_port(haddr, host_str) < 0)
- goto fail;
-
- src_str2 = src_str;
- if (!src_str || *src_str == '\0')
- src_str2 = ":0";
-
- if (parse_host_port(saddr, src_str2) < 0)
- goto fail;
-
- free(str);
- return(0);
-
-fail:
- free(str);
- return -1;
-}
-
int parse_host_port(struct sockaddr_in *saddr, const char *str)
{
char buf[512];