Changeset 24:bd83ce9328ed in freeDiameter for include/freeDiameter/freeDiameter.h
- Timestamp:
- Oct 21, 2009, 6:42:45 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/freeDiameter.h
r23 r24 118 118 struct fd_endpoint { 119 119 struct fd_list chain; /* link in cnf_endpoints list */ 120 120 121 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 */ 122 123 sSA4 sin; 123 124 sSA6 sin6; 124 125 sSA sa; 125 126 }; 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 }; 139 137 140 138 /* Applications */ … … 468 466 469 467 468 /***************************************/ 469 /* Endpoints lists helpers */ 470 /***************************************/ 471 472 int fd_ep_add_merge( struct fd_list * list, sSA * sa, socklen_t sl, uint32_t flags ); 473 int fd_ep_filter( struct fd_list * list, uint32_t flags ); 474 int fd_ep_clearflags( struct fd_list * list, uint32_t flags ); 475 476 477 470 478 #endif /* _FREEDIAMETER_H */
Note: See TracChangeset
for help on using the changeset viewer.