Back to index

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

Go to the source code of this file.


int rfc1035_same_ip (const void *a, int al, const void *b, int bl)

Function Documentation

int rfc1035_same_ip ( const void *  a,
int  al,
const void *  b,
int  bl 

Definition at line 40 of file rfc1035sameip.c.

       if ( ((const struct sockaddr_in *)a)->sin_family != AF_INET ||
              ((const struct sockaddr_in *)b)->sin_family != AF_INET ||
              al < sizeof(struct sockaddr_in) ||
              bl < sizeof(struct sockaddr_in))
              return (0);

       return ( ((const struct sockaddr_in *)a)->sin_addr.s_addr ==
              ((const struct sockaddr_in *)b)->sin_addr.s_addr);

Here is the caller graph for this function: