Back to index

courier  0.68.2
rfc1035bindsource.c
Go to the documentation of this file.
00001 /*
00002 ** Copyright 1998 - 2000 Double Precision, Inc.
00003 ** See COPYING for distribution information.
00004 */
00005 #include      "config.h"
00006 #include      "rfc1035.h"
00007 #include      <sys/types.h>
00008 #include      <sys/socket.h>
00009 #include      <arpa/inet.h>
00010 #include      <errno.h>
00011 
00012 
00013 /*
00014 **     Bind a socket to a local IP. This is used to control the source IP
00015 **     address when making TCP connection.
00016 */
00017 
00018 int    rfc1035_bindsource(int sockfd, const struct sockaddr *addr, int addrlen)
00019 {
00020        return bind(sockfd, addr, addrlen);
00021 }