80# define POLLRDNORM 0x040
83# define POLLRDBAND 0x080
134#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
136#define TAILQ_FIRST(head) ((head)->tqh_first)
147int __rpc_getbroadifs(
int,
int,
int, broadlist_t *);
154__rpc_getbroadifs(
int af,
int proto,
int socktype, broadlist_t *
list)
158 struct ifaddrs *ifap, *ifp;
166 if (getifaddrs(&ifp) < 0)
174 hints.ai_family = af;
176 hints.ai_socktype = socktype;
181 for (ifap = ifp; ifap !=
NULL; ifap = ifap->ifa_next) {
182 if (ifap->ifa_addr->sa_family != af ||
183 !(ifap->ifa_flags &
IFF_UP))
188 bip->
index = if_nametoindex(ifap->ifa_name);
194 ifap->ifa_broadaddr) {
235 while (bip !=
NULL) {
252 sizeof bip->
index) < 0)
265 eachresult, inittime, waittime, nettype)
280 XDR *xdrs = &xdr_stream;
286 u_int maxbufsize = 0;
291 char *uaddrp = uaddress;
315 size_t outlen_pmap = 0;
318 char *outbuf_pmap =
NULL;
324 if (sys_auth ==
NULL) {
335 nettype =
"datagram_n";
352 &fdlist[fdlistno].nal) == 0)
360 fdlist[fdlistno].af = si.
si_af;
361 fdlist[fdlistno].proto = si.
si_proto;
362 fdlist[fdlistno].fd =
fd;
363 fdlist[fdlistno].nconf = nconf;
367 pfd[fdlistno].fd = fdlist[fdlistno].fd =
fd;
371 if (maxbufsize <= fdlist[fdlistno].dsize)
372 maxbufsize = fdlist[fdlistno].dsize;
376 udpbufsz = fdlist[fdlistno].dsize;
377 if ((outbuf_pmap =
malloc(udpbufsz)) ==
NULL) {
393 if (maxbufsize == 0) {
399 outbuf =
malloc(maxbufsize);
416 barg.
args.args_val = argsp;
419 bres.
results.results_val = resultsp;
441 barg_pmap.
vers = vers;
466 for (msec = inittime; msec <= waittime; msec += msec) {
470 for (
i = 0;
i < fdlistno;
i++) {
471 if (fdlist[
i].dsize < outlen) {
491 (
size_t)fdlist[
i].asize) !=
496 warnx(
"clnt_bcast: cannot send"
515 outlen_pmap, 0,
addr,
516 (
size_t)fdlist[
i].asize) !=
519 "Cannot send broadcast packet");
534 if (eachresult ==
NULL) {
544 switch (pollretval =
poll(
pfd, fdlistno, msec)) {
552 for (
i = fds_found = 0;
553 i < fdlistno && fds_found < pollretval;
i++) {
556 if (
pfd[
i].revents == 0)
577 0, (
struct sockaddr *)(
void *)&fdlist[
i].raddr,
582 warnx(
"clnt_bcast: Cannot receive reply to "
598 msg.acpted_rply.ar_results.where =
600 msg.acpted_rply.ar_results.proc =
603 }
else if (pmap_flag &&
608 msg.acpted_rply.ar_results.where =
610 msg.acpted_rply.ar_results.proc =
624 if (pmap_flag && pmap_reply_flag) {
629 sizeof(fdlist[
i].raddr);
630 taddr.
buf = &fdlist[
i].raddr;
631 done = (*eachresult)(resultsp,
632 &taddr, fdlist[
i].nconf);
640 fdlist[
i].nconf, uaddrp);
641 done = (*eachresult)(resultsp,
642 np, fdlist[
i].nconf);
655 (
void) (*xresults)(xdrs, resultsp);
675 for (
i = 0;
i < fdlistno;
i++) {
702 xresults, resultsp, eachresult,
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
#define gettimeofday(tv, tz)
AUTH * authunix_create_default()
#define RPCB_MULTICAST_ADDR
__END_DECLS typedef bool_t(* resultproc_t)(caddr_t,...)
enum clnt_stat rpc_broadcast_exp(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc, xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults, caddr_t resultsp, resultproc_t eachresult, int inittime, int waittime, const char *nettype)
void __rpc_freebroadifs(broadlist_t *list)
enum clnt_stat rpc_broadcast(rpcprog_t prog, rpcvers_t vers, rpcproc_t proc, xdrproc_t xargs, caddr_t argsp, xdrproc_t xresults, caddr_t resultsp, resultproc_t eachresult, const char *nettype)
#define TAILQ_FIRST(head)
#define TAILQ_NEXT(elm, field)
int __rpc_broadenable(int af, int s, struct broadif *bip)
#define AUTH_DESTROY(auth)
INT WSAAPI recvfrom(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags, OUT LPSOCKADDR from, IN OUT INT FAR *fromlen)
INT WSAAPI sendto(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags, IN CONST struct sockaddr *to, IN INT tolen)
GLuint GLuint GLsizei count
GLenum const GLvoid * addr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define memcpy(s1, s2, n)
bool_t xdr_rmtcallres(XDR *xdrs, struct rmtcallres *crp)
bool_t xdr_rmtcall_args(XDR *xdrs, struct rmtcallargs *cap)
static unsigned __int64 next
bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg)
struct opaque_auth _null_auth
void * __rpc_setconf(char *nettype) const
u_int __rpc_get_t_size(int af, int proto, int size)
struct netconfig * __rpc_getconf(void *vhandle)
void __rpc_endconf(void *vhandle)
int __rpc_nconf2sockinfo(const struct netconfig *nconf, struct __rpc_sockinfo *sip)
struct netbuf * uaddr2taddr(const struct netconfig *nconf, const char *uaddr)
bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg)
bool_t xdr_rpcb_rmtcallres(XDR *xdrs, struct rpcb_rmtcallres *p)
bool_t xdr_rpcb_rmtcallargs(XDR *xdrs, struct rpcb_rmtcallargs *p)
namespace GUID const ADDRINFOEXW * hints
INT WSAAPI setsockopt(IN SOCKET s, IN INT level, IN INT optname, IN CONST CHAR FAR *optval, IN INT optlen)
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
__BEGIN_DECLS u_int __rpc_get_a_size(int)
#define __RPC_GETXID(now)
static PIXELFORMATDESCRIPTOR pfd
struct opaque_auth ah_cred
struct opaque_auth ah_verf
struct sockaddr_storage broadaddr
unsigned long nc_semantics
struct r_rpcb_rmtcallargs::@202 args
struct r_rpcb_rmtcallres::@204 results
ADDRESS_FAMILY sin6_family
#define TAILQ_HEAD(name, type)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_ENTRY(type)
#define IPV6_MULTICAST_IF
WINSOCK_API_LINKAGE INT WSAAPI inet_pton(_In_ INT Family, _In_ PCSTR pszAddrString, _Out_writes_bytes_(sizeof(IN6_ADDR)) PVOID pAddrBuf)
#define XDR_DESTROY(xdrs)
bool_t(* xdrproc_t)(XDR *,...)
#define xdr_destroy(xdrs)
void xdrmem_create(XDR *xdrs, char *addr, u_int size, enum xdr_op op)