X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Furi.h;h=7f6ab00a103836955a155791a0fd2d007a8e13b1;hp=d768e8724670d80759c8002a60b2c4acb81efde8;hb=HEAD;hpb=a4b92340642035d1eafeb1eead0ad01f64d2007d diff --git a/src/common/uri.h b/src/common/uri.h deleted file mode 100644 index d768e8724..000000000 --- a/src/common/uri.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2012 - David Goulet - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License, version 2 only, as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef URI_H -#define URI_H - -#include -#include - -/* Destination type of lttng URI */ -enum lttng_dst_type { - LTTNG_DST_IPV4 = 1, - LTTNG_DST_IPV6 = 2, - LTTNG_DST_PATH = 3, -}; - -/* Type of lttng URI where it is a final destination or a hop */ -enum lttng_uri_type { - LTTNG_URI_DST, /* The URI is a final destination */ - /* - * Hops are not supported yet but planned for a future release. - * - LTTNG_URI_HOP, - */ -}; - -/* Communication stream type of a lttng URI */ -enum lttng_stream_type { - LTTNG_STREAM_CONTROL, - LTTNG_STREAM_DATA, -}; - -/* - * Protocol type of a lttng URI. The value 0 indicate that the proto_type field - * should be ignored. - */ -enum lttng_proto_type { - LTTNG_TCP = 1, - /* - * UDP protocol is not supported for now. - * - LTTNG_UDP = 2, - */ -}; - -/* - * Structure representing an URI supported by lttng. - */ -struct lttng_uri { - enum lttng_dst_type dtype; - enum lttng_uri_type utype; - enum lttng_stream_type stype; - enum lttng_proto_type proto; - in_port_t port; - char subdir[PATH_MAX]; - union { - char ipv4[INET_ADDRSTRLEN]; - char ipv6[INET6_ADDRSTRLEN]; - char path[PATH_MAX]; - } dst; -}; - -int uri_compare(struct lttng_uri *uri1, struct lttng_uri *uri2); -void uri_free(struct lttng_uri *uri); -ssize_t uri_parse(const char *str_uri, struct lttng_uri **uris); - -#endif /* _LTT_URI_H */