Lines Matching refs:libdscp

60 #include <libdscp.h>
137 * Interfaces for dynamic use of libdscp.
140 #define LIBDSCP_PATH "/usr/platform/%s/lib/libdscp.so.1"
159 static libdscp_t libdscp;
345 * Functions for loading libdscp.
347 static int load_libdscp(libdscp_t *libdscp);
1352 * Some platforms have libdscp, which provides additional
1353 * security features. An attempt is made to load libdscp
1356 * Nothing is done if libdscp is not available.
1369 if (load_libdscp(&libdscp) != 1) {
1376 error = libdscp.bind(0, fd, port);
1382 if (libdscp.secure(0, fd) != DSCP_OK) {
1393 * libdscp, so an attempt to load and use libdscp is made.
1395 * Without libdscp, this function does nothing.
1401 if ((load_libdscp(&libdscp) == 0) ||
1402 (libdscp.auth(0, addr, len) != DSCP_OK)) {
4489 * Try to dynamically link with libdscp.
4491 * Returns: 0 if libdscp not available,
4492 * 1 if libdscp is available.
4495 load_libdscp(libdscp_t *libdscp)
4503 * Only try to load libdscp once. Use the saved
4504 * status in the libdscp interface to know the
4507 if (libdscp->status == LIBDSCP_AVAILABLE) {
4510 if (libdscp->status == LIBDSCP_UNAVAILABLE) {
4515 * Construct a platform specific pathname for libdscp.
4523 libdscp->status = LIBDSCP_UNAVAILABLE;
4528 * Try dynamically loading libdscp.
4531 libdscp->status = LIBDSCP_UNAVAILABLE;
4538 libdscp->bind = (int (*)(int, int, int))dlsym(lib, LIBDSCP_BIND);
4539 libdscp->secure = (int (*)(int, int))dlsym(lib, LIBDSCP_SECURE);
4540 libdscp->auth = (int (*)(int, struct sockaddr *, int))dlsym(lib,
4543 if ((libdscp->bind == NULL) ||
4544 (libdscp->secure == NULL) ||
4545 (libdscp->auth == NULL)) {
4547 libdscp->status = LIBDSCP_UNAVAILABLE;
4553 * Update the status to indicate libdscp is available.
4555 libdscp->status = LIBDSCP_AVAILABLE;