Deleted Added
full compact
wire-test.c (38495) wire-test.c (38500)
1/*
2 * Copyright (c) 1997-1998 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

--- 24 unchanged lines hidden (view full) ---

33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * %W% (Berkeley) %G%
40 *
1/*
2 * Copyright (c) 1997-1998 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

--- 24 unchanged lines hidden (view full) ---

33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * %W% (Berkeley) %G%
40 *
41 * $Id: wire-test.c,v 5.2.2.2 1992/06/07 18:06:46 jsp Exp jsp $
41 * $Id: wire-test.c,v 1.1.1.1 1998/08/23 22:07:21 obrien Exp $
42 *
43 */
44
45#ifdef HAVE_CONFIG_H
46# include <config.h>
47#endif /* HAVE_CONFIG_H */
48#include <am_defs.h>
49
50#define STRMAX 100
51
52/* dummy variables */
42 *
43 */
44
45#ifdef HAVE_CONFIG_H
46# include <config.h>
47#endif /* HAVE_CONFIG_H */
48#include <am_defs.h>
49
50#define STRMAX 100
51
52/* dummy variables */
53char *progname, hostname[MAXHOSTNAMELEN];
53char *progname, hostname[MAXHOSTNAMELEN + 1];
54int orig_umask, foreground, debug_flags;
55pid_t mypid;
56serv_state amd_state;
57
58int
59main(int argc, char **argv)
60{
61 char *networkName1, *networkNumber1;
62 struct in_addr myipaddr; /* (An) IP address of this host */
63 char *testhost, *proto, *tmp_buf;
64 int nv, ret;
65 struct sockaddr_in *ip;
66 struct hostent *hp = 0;
67
68 progname = argv[0];
69 mypid = getpid();
70 orig_umask = umask(0);
71
54int orig_umask, foreground, debug_flags;
55pid_t mypid;
56serv_state amd_state;
57
58int
59main(int argc, char **argv)
60{
61 char *networkName1, *networkNumber1;
62 struct in_addr myipaddr; /* (An) IP address of this host */
63 char *testhost, *proto, *tmp_buf;
64 int nv, ret;
65 struct sockaddr_in *ip;
66 struct hostent *hp = 0;
67
68 progname = argv[0];
69 mypid = getpid();
70 orig_umask = umask(0);
71
72 if (gethostname(hostname, MAXHOSTNAMELEN) < 0) {
72 if (gethostname(hostname, sizeof hostname) < 0) {
73 perror(argv[0]);
74 exit(1);
75 }
73 perror(argv[0]);
74 exit(1);
75 }
76 hostname[sizeof(hostname) - 1] = '\0';
76
77 /* get list of networks */
78 getwire(&networkName1, &networkNumber1);
79 tmp_buf = print_wires();
80 if (tmp_buf) {
81 fprintf(stderr, "%s", tmp_buf);
82 XFREE(tmp_buf);
83 }

--- 50 unchanged lines hidden ---
77
78 /* get list of networks */
79 getwire(&networkName1, &networkNumber1);
80 tmp_buf = print_wires();
81 if (tmp_buf) {
82 fprintf(stderr, "%s", tmp_buf);
83 XFREE(tmp_buf);
84 }

--- 50 unchanged lines hidden ---