UNIX Network Programming Volume 1, Third Edition [Electronic resources] : The Sockets Networking API نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

UNIX Network Programming Volume 1, Third Edition [Electronic resources] : The Sockets Networking API - نسخه متنی

Addison Wesley

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










9.5 sctp_getpaddrs Function


The getpeername function was not designed with the concept of a multihoming-aware transport protocol; when using SCTP, it only returns the primary address. When all the addresses are required, the sctp_getpaddrs function provides a mechanism for an application to retrieve all the addresses of a peer.

#include <netinet/sctp.h>

int sctp_getpaddrs(int

sockfd , sctp_assoc_t

id , struct sockaddr **

addrs );

Returns: the number of peer addresses stored in

addrs , 1 on error

The

sockfd parameter is the socket descriptor returned by the socket function. The

id is the association identification for a one-to-many-style socket. If the socket is using the one-to-one style, the

id field is ignored.

addrs is the address of a pointer that sctp_getpaddrs will fill in with a locally allocated, packed list of addresses. See Figures 9.4 and 23.12 for details on the structure of this return value. The caller should use sctp_freepaddrs to free resources allocated by sctp_getpaddrs when finished with them.


/ 450