Ignore:
Timestamp:
Sep 16, 2008 4:11:44 PM (16 years ago)
Author:
nanang
Message:

Ticket #629: Added IGMPv2 multicast socket options (thanks David Parker for the patch).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/sock.h

    r2039 r2283  
    290290extern const pj_uint16_t PJ_SO_SNDBUF; 
    291291 
     292/** IP multicast interface. @see pj_IP_MULTICAST_IF() */ 
     293extern const pj_uint16_t PJ_IP_MULTICAST_IF; 
     294  
     295/** IP multicast ttl. @see pj_IP_MULTICAST_TTL() */ 
     296extern const pj_uint16_t PJ_IP_MULTICAST_TTL; 
     297 
     298/** IP multicast loopback. @see pj_IP_MULTICAST_LOOP() */ 
     299extern const pj_uint16_t PJ_IP_MULTICAST_LOOP; 
     300 
     301/** Add an IP group membership. @see pj_IP_ADD_MEMBERSHIP() */ 
     302extern const pj_uint16_t PJ_IP_ADD_MEMBERSHIP; 
     303 
     304/** Drop an IP group membership. @see pj_IP_DROP_MEMBERSHIP() */ 
     305extern const pj_uint16_t PJ_IP_DROP_MEMBERSHIP; 
     306 
    292307 
    293308#if defined(PJ_DLL) 
     
    300315    /** Get #PJ_SO_SNDBUF constant */ 
    301316    PJ_DECL(pj_uint16_t) pj_SO_SNDBUF(void); 
     317 
     318    /** Get #PJ_IP_MULTICAST_IF constant */ 
     319    PJ_DECL(pj_uint16_t) pj_IP_MULTICAST_IF(void); 
     320 
     321    /** Get #PJ_IP_MULTICAST_TTL constant */ 
     322    PJ_DECL(pj_uint16_t) pj_IP_MULTICAST_TTL(void); 
     323 
     324    /** Get #PJ_IP_MULTICAST_LOOP constant */ 
     325    PJ_DECL(pj_uint16_t) pj_IP_MULTICAST_LOOP(void); 
     326 
     327    /** Get #PJ_IP_ADD_MEMBERSHIP constant */ 
     328    PJ_DECL(pj_uint16_t) pj_IP_ADD_MEMBERSHIP(void); 
     329 
     330    /** Get #PJ_IP_DROP_MEMBERSHIP constant */ 
     331    PJ_DECL(pj_uint16_t) pj_IP_DROP_MEMBERSHIP(void); 
    302332#else 
    303333    /** Get #PJ_SO_TYPE constant */ 
     
    309339    /** Get #PJ_SO_SNDBUF constant */ 
    310340#   define pj_SO_SNDBUF()   PJ_SO_SNDBUF 
     341 
     342    /** Get #PJ_IP_MULTICAST_IF constant */ 
     343#   define pj_IP_MULTICAST_IF()    PJ_IP_MULTICAST_IF 
     344 
     345    /** Get #PJ_IP_MULTICAST_TTL constant */ 
     346#   define pj_IP_MULTICAST_TTL()   PJ_IP_MULTICAST_TTL 
     347 
     348    /** Get #PJ_IP_MULTICAST_LOOP constant */ 
     349#   define pj_IP_MULTICAST_LOOP()  PJ_IP_MULTICAST_LOOP 
     350 
     351    /** Get #PJ_IP_ADD_MEMBERSHIP constant */ 
     352#   define pj_IP_ADD_MEMBERSHIP()  PJ_IP_ADD_MEMBERSHIP 
     353 
     354    /** Get #PJ_IP_DROP_MEMBERSHIP constant */ 
     355#   define pj_IP_DROP_MEMBERSHIP() PJ_IP_DROP_MEMBERSHIP 
    311356#endif 
    312357 
     
    516561 
    517562 
     563/** 
     564 * This structure provides multicast group information for IPv4 addresses. 
     565 */ 
     566typedef struct pj_ip_mreq { 
     567    pj_in_addr imr_multiaddr;   /**< IP multicast address of group. */ 
     568    pj_in_addr imr_interface;   /**< local IP address of interface. */ 
     569} pj_ip_mreq; 
     570 
     571 
    518572/***************************************************************************** 
    519573 * 
Note: See TracChangeset for help on using the changeset viewer.