Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/tsocket/tsocket.h

    r860 r988  
    628628                                TALLOC_CTX *mem_ctx);
    629629
     630#ifdef DOXYGEN
     631/**
     632 * @brief Wrap an existing file descriptors into the tdgram abstraction.
     633 *
     634 * You can use this function to wrap an existing file descriptors into the
     635 * tdgram abstraction. After that you're not able to use this file descriptor
     636 * for anything else. The file descriptor will be closed when the stream gets
     637 * freed. If you still want to use the fd you have have to create a duplicate.
     638 *
     639 * @param[in]  mem_ctx  The talloc memory context to use.
     640 *
     641 * @param[in]  fd       The non blocking fd to use!
     642 *
     643 * @param[out] dgram    A pointer to store an allocated tdgram_context.
     644 *
     645 * @return              0 on success, -1 on error.
     646 *
     647 * Example:
     648 * @code
     649 *   fd2 = dup(fd);
     650 *   rc = tdgram_bsd_existing_socket(mem_ctx, fd2, &tdgram);
     651 *   if (rc < 0) {
     652 *     return;
     653 *   }
     654 * @endcode
     655 *
     656 * @warning This is an internal function. You should read the code to fully
     657 *          understand it if you plan to use it.
     658 */
     659int tdgram_bsd_existing_socket(TALLOC_CTX *mem_ctx,
     660                               int fd,
     661                               struct tdgram_context **dgram);
     662#else
     663int _tdgram_bsd_existing_socket(TALLOC_CTX *mem_ctx,
     664                                int fd,
     665                                struct tdgram_context **_dgram,
     666                                const char *location);
     667#define tdgram_bsd_existing_socket(mem_ctx, fd, dgram) \
     668        _tdgram_bsd_existing_socket(mem_ctx, fd, dgram, \
     669                                    __location__)
     670#endif
     671
    630672/**
    631673 * @brief Request a syscall optimization for tdgram_recvfrom_send()
     
    664706 *
    665707 * @return              0 on success, -1 on error with errno set.
     708 *
     709 * @see tdgram_inet_udp_broadcast_socket()
    666710 */
    667711int tdgram_inet_udp_socket(const struct tsocket_address *local,
     
    677721#define tdgram_inet_udp_socket(local, remote, mem_ctx, dgram) \
    678722        _tdgram_inet_udp_socket(local, remote, mem_ctx, dgram, __location__)
     723#endif
     724
     725#ifdef DOXYGEN
     726/**
     727 * @brief Create a tdgram_context for a ipv4 UDP broadcast (and unicast) communication.
     728 *
     729 * @param[in]  local    An 'inet' (ipv4 only) tsocket_address for the local endpoint.
     730 *
     731 * @param[in]  mem_ctx  The talloc memory context to use.
     732 *
     733 * @param[in]  dgram    The tdgram_context pointer to setup the udp
     734 *                      communication. The function will allocate the memory.
     735 *
     736 * @return              0 on success, -1 on error with errno set.
     737 *
     738 * @see tdgram_inet_udp_socket()
     739 */
     740int tdgram_inet_udp_broadcast_socket(const struct tsocket_address *local,
     741                                     TALLOC_CTX *mem_ctx,
     742                                     struct tdgram_context **dgram);
     743#else
     744int _tdgram_inet_udp_broadcast_socket(const struct tsocket_address *local,
     745                                      TALLOC_CTX *mem_ctx,
     746                                      struct tdgram_context **dgram,
     747                                      const char *location);
     748#define tdgram_inet_udp_broadcast_socket(local, mem_ctx, dgram) \
     749        _tdgram_inet_udp_broadcast_socket(local, mem_ctx, dgram, __location__)
    679750#endif
    680751
     
    898969 */
    899970int tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
    900                                       struct sockaddr *sa,
     971                                      const struct sockaddr *sa,
    901972                                      size_t sa_socklen,
    902973                                      struct tsocket_address **addr);
    903974#else
    904975int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
    905                                        struct sockaddr *sa,
     976                                       const struct sockaddr *sa,
    906977                                       size_t sa_socklen,
    907978                                       struct tsocket_address **_addr,
Note: See TracChangeset for help on using the changeset viewer.