def METHOD_NAME(name, result_p, buffer_p, buflen):
    """
    ctypes wrapper for:
        enum nss_status _nss_sss_getnetbyname_r(const char *name,
                                                struct netent *result,
                                                char *buffer, size_t buflen,
                                                int *errnop, int *h_errnop)
    """
    func = nss_sss_ctypes_loader("_nss_sss_getnetbyname_r")
    func.restype = c_int
    func.argtypes = [c_char_p, POINTER(Netent),
                     c_char_p, c_ulong, POINTER(c_int), POINTER(c_int)]
    errno = POINTER(c_int)(c_int(0))
    h_errno = POINTER(c_int)(c_int(0))
    name = name.encode('utf-8')
    res = func(c_char_p(name), result_p, buffer_p, buflen, errno, h_errno)
    return (int(res), int(errno[0]), int(h_errno[0]), result_p)