~ubuntu-branches/ubuntu/utopic/binkd/utopic-proposed

« back to all changes in this revision

Viewing changes to iptools.h

  • Committer: Bazaar Package Importer
  • Author(s): Marco d'Itri
  • Date: 2002-03-24 22:52:25 UTC
  • Revision ID: james.westby@ubuntu.com-20020324225225-7ru6itlapn03nl35
Tags: upstream-0.9.5a
ImportĀ upstreamĀ versionĀ 0.9.5a

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  iptools.h -- Some useful TCP/IP utils
 
3
 *
 
4
 *  iptools.h is a part of binkd project
 
5
 *
 
6
 *  Copyright (C) 1997  Dima Maloff, 5047/13
 
7
 *
 
8
 *  This program is free software; you can redistribute it and/or modify
 
9
 *  it under the terms of the GNU General Public License as published by
 
10
 *  the Free Software Foundation; either version 2 of the License, or
 
11
 *  (at your option) any later version. See COPYING.
 
12
 */
 
13
 
 
14
/*
 
15
 * $Id: iptools.h,v 2.0 2001/01/10 12:12:38 gul Exp $
 
16
 *
 
17
 * $Log: iptools.h,v $
 
18
 * Revision 2.0  2001/01/10 12:12:38  gul
 
19
 * Binkd is under CVS again
 
20
 *
 
21
 * Revision 1.2  1997/10/23  04:00:57  mff
 
22
 * +find_port()
 
23
 *
 
24
 * Revision 1.1  1997/03/28  06:52:14  mff
 
25
 * Initial revision
 
26
 *
 
27
 */
 
28
 
 
29
/*
 
30
 * Finds ASCIIZ address
 
31
 */
 
32
const char *get_hostname (struct sockaddr_in * addr, char *host, int len);
 
33
 
 
34
void copy_hostent(struct hostent *dest, struct hostent *src);
 
35
 
 
36
/*
 
37
 * Sets non-blocking mode for a given socket
 
38
 */
 
39
void setsockopts (SOCKET s);
 
40
 
 
41
/*
 
42
 * Find the port number (in the host byte order) by a port number string or
 
43
 * a service name. Find_port ("") will return binkp's port from
 
44
 * /etc/services or even (if there is no binkp entry) 24554.
 
45
 * Returns 0 on error.
 
46
 */
 
47
int find_port (char *s);