Ignore:
Timestamp:
Jul 31, 2007, 2:26:44 PM (14 years ago)
Author:
charles
Message:

continue whittling away at internal.h to reduce the global #include dependencies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.c

    r2555 r2573  
    2929
    3030#include <sys/types.h>
    31 #include <sys/socket.h>
    32 #include <netinet/in.h>
    33 #include <arpa/inet.h>
    3431#include <netdb.h>
    3532#include <fcntl.h>
     
    3835#include "fdlimit.h"
    3936#include "net.h"
     37#include "platform.h"
    4038#include "utils.h"
    4139
     
    273271}
    274272
    275 int tr_netOpen( const struct in_addr * addr, tr_port_t port,
    276                 int type, int priority )
     273static int
     274tr_netOpen( const struct in_addr * addr, tr_port_t port,
     275            int type, int priority )
    277276{
    278277    int s;
     
    300299    return s;
    301300}
     301 
     302int
     303tr_netOpenTCP( const struct in_addr * addr, tr_port_t port, int priority )
     304{
     305    return tr_netOpen( addr, port, SOCK_STREAM, priority );
     306}
     307
     308int
     309tr_netOpenUDP( const struct in_addr * addr, tr_port_t port, int priority )
     310{
     311    return tr_netOpen( addr, port, SOCK_DGRAM, priority );
     312}
    302313
    303314#ifdef IP_ADD_MEMBERSHIP
     
    332343#endif /* IP_ADD_MEMBERSHIP */
    333344
    334 int tr_netBind( int port, int type )
     345static int
     346tr_netBind( int port, int type )
    335347{
    336348    int s;
     
    373385    return s;
    374386}
     387
     388int
     389tr_netBindTCP( int port )
     390{
     391    return tr_netBind( port, SOCK_STREAM );
     392}
     393
     394int
     395tr_netBindUDP( int port )
     396{
     397    return tr_netBind( port, SOCK_DGRAM );
     398}
     399
    375400
    376401int tr_netAccept( int b, struct in_addr * addr, tr_port_t * port )
Note: See TracChangeset for help on using the changeset viewer.