35 #if     !defined(_WIN32) && !defined(_WIN32_WCE) 
   38 #include <sys/types.h> 
   41 #define ORTP_FD_SET(d, s)     FD_SET(d, s) 
   42 #define ORTP_FD_CLR(d, s)     FD_CLR(d, s) 
   43 #define ORTP_FD_ISSET(d, s)   FD_ISSET(d, s) 
   44 #define ORTP_FD_ZERO(s)           FD_ZERO(s) 
   46 typedef fd_set ortp_fd_set;
 
   52 #define ORTP_FD_ZERO(s) \ 
   55     ortp_fd_set *__arr = (s);                                                 \ 
   56     for (__i = 0; __i < sizeof (ortp_fd_set) / sizeof (ortp__fd_mask); ++__i)         \ 
   57       ORTP__FDS_BITS (__arr)[__i] = 0;                                        \ 
   59 #define ORTP_FD_SET(d, s)     (ORTP__FDS_BITS (s)[ORTP__FDELT(d)] |= ORTP__FDMASK(d)) 
   60 #define ORTP_FD_CLR(d, s)     (ORTP__FDS_BITS (s)[ORTP__FDELT(d)] &= ~ORTP__FDMASK(d)) 
   61 #define ORTP_FD_ISSET(d, s)   ((ORTP__FDS_BITS (s)[ORTP__FDELT(d)] & ORTP__FDMASK(d)) != 0) 
   66 typedef long int ortp__fd_mask;
 
   70 #define ORTP__FD_SETSIZE 1024 
   73 #define ORTP__NFDBITS   (8 * sizeof (ortp__fd_mask)) 
   74 #define ORTP__FDELT(d)  ((d) / ORTP__NFDBITS) 
   75 #define ORTP__FDMASK(d) ((ortp__fd_mask) 1 << ((d) % ORTP__NFDBITS)) 
   81     ortp__fd_mask fds_bits[ORTP__FD_SETSIZE / ORTP__NFDBITS];
 
   82 # define ORTP__FDS_BITS(set) ((set)->fds_bits) 
   96 #define session_set_init(ss)            ORTP_FD_ZERO(&(ss)->rtpset) 
  104 #define session_set_set(ss,rtpsession)          ORTP_FD_SET((rtpsession)->mask_pos,&(ss)->rtpset) 
  112 #define session_set_is_set(ss,rtpsession)       ORTP_FD_ISSET((rtpsession)->mask_pos,&(ss)->rtpset) 
  121 #define session_set_clr(ss,rtpsession)          ORTP_FD_CLR((rtpsession)->mask_pos,&(ss)->rtpset) 
  123 #define session_set_copy(dest,src)              memcpy(&(dest)->rtpset,&(src)->rtpset,sizeof(ortp_fd_set)) 
ORTP_PUBLIC int session_set_select(SessionSet *recvs, SessionSet *sends, SessionSet *errors)
Definition: sessionset.c:113
Definition: sessionset.h:88
ORTP_PUBLIC void session_set_destroy(SessionSet *set)
Definition: sessionset.c:43
ORTP_PUBLIC SessionSet * session_set_new(void)
Definition: sessionset.c:30