source: lib/ftutil.h @ 61d2eabb

Last change on this file since 61d2eabb was f1f7b5e, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-07-24T22:50:23Z

Take the local address from the IM/IRC connection when setting up a listening
socket for file transfers.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/***************************************************************************\
2*                                                                           *
3*  BitlBee - An IRC to IM gateway                                           *
4*  Utility functions for file transfer                                      *
5*                                                                           *
6*  Copyright 2008 Uli Meis <a.sporto+bee@gmail.com>                         *
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.                                      *
12*                                                                           *
13*  This program is distributed in the hope that it will be useful,          *
14*  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
15*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
16*  GNU General Public License for more details.                             *
17*                                                                           *
18*  You should have received a copy of the GNU General Public License along  *
19*  with this program; if not, write to the Free Software Foundation, Inc.,  *
20*  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.              *
21*                                                                           *
22\***************************************************************************/
23
24#ifndef AI_NUMERICSERV
25#define AI_NUMERICSERV 0x0400   /* Don't use name resolution.  */
26#endif
27
28/* Some ifdefs for ulibc and apparently also BSD (Thanks to Whoopie) */
29#ifndef HOST_NAME_MAX
30#include <sys/param.h>
31#ifdef MAXHOSTNAMELEN
32#define HOST_NAME_MAX MAXHOSTNAMELEN
33#else
34#define HOST_NAME_MAX 255
35#endif
36#endif
37
38/* This function should be used with care. host should be AT LEAST a
39   char[HOST_NAME_MAX+1] and port AT LEAST a char[6]. */
40int ft_listen( struct sockaddr_storage *saddr_ptr, char *host, char *port, int copy_fd, int for_bitlbee_client, char **errptr );
Note: See TracBrowser for help on using the repository browser.