Merging serial model from branch; converting to the hideous indentation style of...
[lwes-journaller.git] / src / xport.c
blob71311cd5bc3c7870478d08daadcdc834ad534d14
1 /*======================================================================*
2 * Copyright (C) 2008 Light Weight Event System *
3 * All rights reserved. *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
18 * Boston, MA 02110-1301 USA. *
19 *======================================================================*/
21 #include "xport.h"
22 #include "xport_udp.h"
24 #include "log.h"
25 #include "opt.h"
27 #include <string.h>
28 #include <stdio.h>
30 int xport_factory(struct xport* this_xport)
32 /* Only UDP transport supported. */
33 if ( strcmp(arg_xport, "udp") != 0 )
35 LOG_ER("unrecognized transport type \"%s\", try \"upd\"\n",
36 arg_xport);
37 return -1;
40 /* Since we currently have only one xport type: */
41 return xport_udp_ctor (this_xport, arg_ip,
42 arg_interface, arg_port, arg_join_group);