libvirt/src/util/viruri.h
Martin Kletzander 9f748277bb Fixed URI parsing
Function xmlParseURI does not remove square brackets around IPv6
address when parsing. One of the solutions is making wrappers around
functions working with xmlURI*. This assures that uri->server will be
always properly assigned and it doesn't have to be changed when used
on some new place in the code.
For this purpose, functions virParseURI and virSaveURI were
added. These function are wrappers around xmlParseURI and xmlSaveUri
respectively.
Also there is one new syntax check function to prohibit these functions
anywhere else.

File changes:
 - src/util/viruri.h        -- declaration
 - src/util/viruri.c        -- definition
 - src/libvirt_private.syms -- symbol export
 - src/Makefile.am          -- added source and header files
 - cfg.mk                   -- added sc_prohibit_xmlURI
 - all others               -- ID name and include fixes
2012-02-24 16:49:21 -07:00

23 lines
413 B
C

/*
* viruri.h: internal definitions used for URI parsing.
*
* Copyright (C) 2012 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*/
#ifndef __VIR_URI_H__
# define __VIR_URI_H__
# include <libxml/uri.h>
# include "internal.h"
typedef xmlURI virURI;
typedef xmlURIPtr virURIPtr;
virURIPtr virURIParse(const char *uri);
char *virURIFormat(virURIPtr uri);
#endif /* __VIR_URI_H__ */