/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/socket.h> 

int sendmsg(int s, struct msghdr *msg, int flags) {
    void *fptr;
    int retval;

    fptr = dlsym(_ChSysSocket_handle, "sendmsg_chdl");
    if(fptr == NULL)  {
       printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
       return -1;
    }
    dlrunfun(fptr, &retval, sendmsg, s, msg, flags);
    return retval;
}
