Navigation



Ignore:
Timestamp:
Oct 21, 2009, 6:42:45 PM (15 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Cleanups and completed sctp code (not finished)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/freeDiameter.h

    r23 r24  
    118118struct fd_endpoint {
    119119        struct fd_list  chain;  /* link in cnf_endpoints list */
     120       
    120121        union {
    121                 sSS             ss;     /* the socket information. List is always ordered by ss value (memcmp) */
     122                sSS             ss;     /* the socket information. List is always ordered by ss value (memcmp) -- see fd_ep_add_merge */
    122123                sSA4            sin;
    123124                sSA6            sin6;
    124125                sSA             sa;
    125126        };
    126         struct {
    127                 unsigned conf : 1; /* This endpoint is statically configured in a configuration file */
    128                 unsigned disc : 1; /* This endpoint was resolved from the Diameter Identity or other DNS query */
    129                 unsigned adv  : 1; /* This endpoint was advertized in Diameter CER/CEA exchange */
    130                 unsigned ll   : 1; /* Lower layer mechanism provided this endpoint */
    131                
    132                 /* To add: a validity timestamp for DNS records ? How do we retrieve this lifetime from DNS ? */
    133 
    134         }               meta;   /* Additional information about the endpoint */
    135 };
    136 
    137 /* Add a new entry in a list of endpoints -- merge if the sockaddr was already there */
    138 int fd_ep_add_merge( struct fd_list * list, sSA * sa, socklen_t sl, int conf, int disc, int adv, int ll );
     127       
     128#define EP_FL_CONF      (1 << 0)        /* This endpoint is statically configured in a configuration file */
     129#define EP_FL_DISC      (1 << 1)        /* This endpoint was resolved from the Diameter Identity or other DNS query */
     130#define EP_FL_ADV       (1 << 2)        /* This endpoint was advertized in Diameter CER/CEA exchange */
     131#define EP_FL_LL        (1 << 3)        /* Lower layer mechanism provided this endpoint */
     132#define EP_FL_PRIMARY   (1 << 4)        /* This endpoint is primary in a multihomed SCTP association */
     133        uint32_t        flags;          /* Additional information about the endpoint */
     134               
     135        /* To add: a validity timestamp for DNS records ? How do we retrieve this lifetime from DNS ? */
     136};
    139137
    140138/* Applications */
     
    468466
    469467
     468/***************************************/
     469/*   Endpoints lists helpers           */
     470/***************************************/
     471
     472int fd_ep_add_merge( struct fd_list * list, sSA * sa, socklen_t sl, uint32_t flags );
     473int fd_ep_filter( struct fd_list * list, uint32_t flags );
     474int fd_ep_clearflags( struct fd_list * list, uint32_t flags );
     475
     476
     477
    470478#endif /* _FREEDIAMETER_H */
Note: See TracChangeset for help on using the changeset viewer.