ReactOS 0.4.15-dev-7842-g558ab78
nettype.h File Reference
#include <netconfig.h>
Include dependency graph for nettype.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _RPC_NONE   0
 
#define _RPC_NETPATH   1
 
#define _RPC_VISIBLE   2
 
#define _RPC_CIRCUIT_V   3
 
#define _RPC_DATAGRAM_V   4
 
#define _RPC_CIRCUIT_N   5
 
#define _RPC_DATAGRAM_N   6
 
#define _RPC_TCP   7
 
#define _RPC_UDP   8
 

Functions

__BEGIN_DECLS void__rpc_setconf (const char *)
 
void __rpc_endconf (void *)
 
struct netconfig__rpc_getconf (void *)
 
struct netconfig__rpc_getconfip (const char *)
 

Macro Definition Documentation

◆ _RPC_CIRCUIT_N

#define _RPC_CIRCUIT_N   5

Definition at line 51 of file nettype.h.

◆ _RPC_CIRCUIT_V

#define _RPC_CIRCUIT_V   3

Definition at line 49 of file nettype.h.

◆ _RPC_DATAGRAM_N

#define _RPC_DATAGRAM_N   6

Definition at line 52 of file nettype.h.

◆ _RPC_DATAGRAM_V

#define _RPC_DATAGRAM_V   4

Definition at line 50 of file nettype.h.

◆ _RPC_NETPATH

#define _RPC_NETPATH   1

Definition at line 47 of file nettype.h.

◆ _RPC_NONE

#define _RPC_NONE   0

Definition at line 46 of file nettype.h.

◆ _RPC_TCP

#define _RPC_TCP   7

Definition at line 53 of file nettype.h.

◆ _RPC_UDP

#define _RPC_UDP   8

Definition at line 54 of file nettype.h.

◆ _RPC_VISIBLE

#define _RPC_VISIBLE   2

Definition at line 48 of file nettype.h.

Function Documentation

◆ __rpc_endconf()

void __rpc_endconf ( void vhandle)

Definition at line 425 of file rpc_generic.c.

427{
428 struct handle *handle;
429
430 handle = (struct handle *) vhandle;
431 if (handle == NULL) {
432 return;
433 }
434 if (handle->nflag) {
436 } else {
438 }
439 free(handle);
440}
#define free
Definition: debug_ros.c:5
#define NULL
Definition: types.h:112
int endnetconfig(void *handlep)
Definition: getnetconfig.c:373
int endnetpath(void *handlep)
Definition: getnetpath.c:191
NCONF_HANDLE * nhandle
Definition: rpc_generic.c:62
int nflag
Definition: rpc_generic.c:63

Referenced by clnt_create_timed(), rpc_broadcast_exp(), rpc_reg(), rpcb_gettime(), and svc_create().

◆ __rpc_getconf()

struct netconfig * __rpc_getconf ( void vhandle)

Definition at line 348 of file rpc_generic.c.

350{
351 struct handle *handle;
352 struct netconfig *nconf;
353
354 handle = (struct handle *)vhandle;
355 if (handle == NULL) {
356 return (NULL);
357 }
358 for (;;) {
359 if (handle->nflag)
360 nconf = getnetpath(handle->nhandle);
361 else
362 nconf = getnetconfig(handle->nhandle);
363 if (nconf == NULL)
364 break;
365 if ((nconf->nc_semantics != NC_TPI_CLTS) &&
366 (nconf->nc_semantics != NC_TPI_COTS) &&
367 (nconf->nc_semantics != NC_TPI_COTS_ORD))
368 continue;
369 switch (handle->nettype) {
370 case _RPC_VISIBLE:
371 if (!(nconf->nc_flag & NC_VISIBLE))
372 continue;
373 /* FALLTHROUGH */
374 case _RPC_NETPATH: /* Be happy */
375 break;
376 case _RPC_CIRCUIT_V:
377 if (!(nconf->nc_flag & NC_VISIBLE))
378 continue;
379 /* FALLTHROUGH */
380 case _RPC_CIRCUIT_N:
381 if ((nconf->nc_semantics != NC_TPI_COTS) &&
382 (nconf->nc_semantics != NC_TPI_COTS_ORD))
383 continue;
384 break;
385 case _RPC_DATAGRAM_V:
386 if (!(nconf->nc_flag & NC_VISIBLE))
387 continue;
388 /* FALLTHROUGH */
389 case _RPC_DATAGRAM_N:
390 if (nconf->nc_semantics != NC_TPI_CLTS)
391 continue;
392 break;
393 case _RPC_TCP:
394 if (((nconf->nc_semantics != NC_TPI_COTS) &&
395 (nconf->nc_semantics != NC_TPI_COTS_ORD)) ||
396 (strcmp(nconf->nc_protofmly, NC_INET)
397#ifdef INET6
398 && strcmp(nconf->nc_protofmly, NC_INET6))
399#else
400 )
401#endif
402 ||
403 strcmp(nconf->nc_proto, NC_TCP))
404 continue;
405 break;
406 case _RPC_UDP:
407 if ((nconf->nc_semantics != NC_TPI_CLTS) ||
408 (strcmp(nconf->nc_protofmly, NC_INET)
409#ifdef INET6
410 && strcmp(nconf->nc_protofmly, NC_INET6))
411#else
412 )
413#endif
414 ||
415 strcmp(nconf->nc_proto, NC_UDP))
416 continue;
417 break;
418 }
419 break;
420 }
421 return (nconf);
422}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
struct netconfig * getnetconfig(void *handlep)
Definition: getnetconfig.c:253
struct netconfig * getnetpath(void *handlep)
Definition: getnetpath.c:134
#define NC_TPI_COTS
Definition: netconfig.h:36
#define NC_VISIBLE
Definition: netconfig.h:44
#define NC_TPI_CLTS
Definition: netconfig.h:35
#define NC_TPI_COTS_ORD
Definition: netconfig.h:37
#define NC_INET6
Definition: netconfig.h:53
#define NC_TCP
Definition: netconfig.h:79
#define NC_INET
Definition: netconfig.h:52
#define NC_UDP
Definition: netconfig.h:80
#define _RPC_UDP
Definition: nettype.h:54
#define _RPC_CIRCUIT_V
Definition: nettype.h:49
#define _RPC_CIRCUIT_N
Definition: nettype.h:51
#define _RPC_VISIBLE
Definition: nettype.h:48
#define _RPC_NETPATH
Definition: nettype.h:47
#define _RPC_DATAGRAM_V
Definition: nettype.h:50
#define _RPC_TCP
Definition: nettype.h:53
#define _RPC_DATAGRAM_N
Definition: nettype.h:52
int nettype
Definition: rpc_generic.c:64
unsigned long nc_semantics
Definition: netconfig.h:17
unsigned long nc_flag
Definition: netconfig.h:18
char * nc_protofmly
Definition: netconfig.h:19
char * nc_proto
Definition: netconfig.h:20

Referenced by clnt_create_timed(), rpc_broadcast_exp(), rpc_reg(), rpcb_gettime(), and svc_create().

◆ __rpc_getconfip()

struct netconfig * __rpc_getconfip ( const char )

◆ __rpc_setconf()

__BEGIN_DECLS void * __rpc_setconf ( const char )