Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/lib/tsocket/tsocket.h

    r480 r745  
    8484
    8585/**
    86  * @brief Get a string representaion of the endpoint.
     86 * @brief Get a string representation of the endpoint.
    8787 *
    8888 * This function creates a string representation of the endpoint for debugging.
     
    102102 * @return              The address as a string representation, NULL on error.
    103103 *
     104 * @see tsocket_address_is_inet()
    104105 * @see tsocket_address_inet_addr_string()
    105106 * @see tsocket_address_inet_port()
     
    486487 * @{
    487488 */
     489
     490/**
     491 * @brief Find out if the tsocket_address represents an ipv4 or ipv6 endpoint.
     492 *
     493 * @param[in]  addr     The tsocket_address pointer
     494 *
     495 * @param[in]  fam      The family can be can be "ipv4", "ipv6" or "ip". With
     496 *                      "ip" is autodetects "ipv4" or "ipv6" based on the
     497 *                      addr.
     498 *
     499 * @return              true if addr represents an address of the given family,
     500 *                      otherwise false.
     501 */
     502bool tsocket_address_is_inet(const struct tsocket_address *addr, const char *fam);
    488503
    489504#if DOXYGEN
     
    534549 * @return              A newly allocated string of the address, NULL on error
    535550 *                      with errno set.
     551 *
     552 * @see tsocket_address_is_inet()
    536553 */
    537554char *tsocket_address_inet_addr_string(const struct tsocket_address *addr,
     
    559576                                  uint16_t port);
    560577
     578/**
     579 * @brief Find out if the tsocket_address represents an unix domain endpoint.
     580 *
     581 * @param[in]  addr     The tsocket_address pointer
     582 *
     583 * @return              true if addr represents an unix domain endpoint,
     584 *                      otherwise false.
     585 */
     586bool tsocket_address_is_unix(const struct tsocket_address *addr);
     587
    561588#ifdef DOXYGEN
    562589/**
     
    570597 *
    571598 * @return              0 on success, -1 on error with errno set.
     599 *
     600 * @see tsocket_address_is_unix()
    572601 */
    573602int tsocket_address_unix_from_path(TALLOC_CTX *mem_ctx,
     
    696725 * @param[in]  mem_ctx  The talloc memory context to use.
    697726 *
    698  * @param[in] stream   A tstream_context pointer to setup the tcp communication
     727 * @param[out] stream   A tstream_context pointer to setup the tcp communication
    699728 *                      on. This function will allocate the memory.
     729 *
     730 * @param[out] local    The real 'inet' tsocket_address of the local endpoint.
     731 *                      This parameter is optional and can be NULL.
    700732 *
    701733 * @return              0 on success, -1 on error with perrno set.
     
    704736                                  int *perrno,
    705737                                  TALLOC_CTX *mem_ctx,
    706                                   struct tstream_context **stream);
     738                                  struct tstream_context **stream,
     739                                  struct tsocket_address **local)
    707740#else
    708741int _tstream_inet_tcp_connect_recv(struct tevent_req *req,
     
    710743                                   TALLOC_CTX *mem_ctx,
    711744                                   struct tstream_context **stream,
     745                                   struct tsocket_address **local,
    712746                                   const char *location);
    713 #define tstream_inet_tcp_connect_recv(req, perrno, mem_ctx, stream) \
    714         _tstream_inet_tcp_connect_recv(req, perrno, mem_ctx, stream, \
     747#define tstream_inet_tcp_connect_recv(req, perrno, mem_ctx, stream, local) \
     748        _tstream_inet_tcp_connect_recv(req, perrno, mem_ctx, stream, local, \
    715749                                       __location__)
    716750#endif
     
    874908 * freed. If you still want to use the fd you have have to create a duplicate.
    875909 *
    876  * @param[in]  mem_ctx      The talloc memory context to use.
    877  *
    878  * @param[in]  fd           The non blocking fd to use!
    879  *
    880  * @param[in]  stream       The filed tstream_context you allocated before.
    881  *
    882  * @return              0 on success, -1 on error with errno set.
    883  *
    884  * @warning You should read the tsocket_bsd.c code and unterstand it in order
    885  * use this function.
     910 * @param[in]  mem_ctx  The talloc memory context to use.
     911 *
     912 * @param[in]  fd       The non blocking fd to use!
     913 *
     914 * @param[out] stream   A pointer to store an allocated tstream_context.
     915 *
     916 * @return              0 on success, -1 on error.
     917 *
     918 * Example:
     919 * @code
     920 *   fd2 = dup(fd);
     921 *   rc = tstream_bsd_existing_socket(mem_ctx, fd2, &tstream);
     922 *   if (rc < 0) {
     923 *     stream_terminate_connection(conn, "named_pipe_accept: out of memory");
     924 *     return;
     925 *   }
     926 * @endcode
     927 *
     928 * @warning This is an internal function. You should read the code to fully
     929 *          understand it if you plan to use it.
    886930 */
    887931int tstream_bsd_existing_socket(TALLOC_CTX *mem_ctx,
Note: See TracChangeset for help on using the changeset viewer.