Back to index

courier  0.68.2
rfc1035mksocket.c File Reference
#include "config.h"
#include "rfc1035.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <errno.h>

Go to the source code of this file.


int rfc1035_mksocket (int sock_type, int sock_protocol, int *af)

Function Documentation

int rfc1035_mksocket ( int  sock_type,
int  sock_protocol,
int *  af 

Definition at line 19 of file rfc1035mksocket.c.

#if    RFC1035_IPV6
       int    s;
       int    on=0;

       if ( (s=socket(PF_INET6, sock_type, sock_protocol)) >= 0)
#ifdef IPV6_V6ONLY

              setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
                        (char *)&on, sizeof(on));

              return (s);
       return (socket(PF_INET, sock_type, sock_protocol));

Here is the caller graph for this function: