.. | .. |
---|
61 | 61 | * entity_addr -- network address |
---|
62 | 62 | */ |
---|
63 | 63 | struct ceph_entity_addr { |
---|
64 | | - __le32 type; |
---|
| 64 | + __le32 type; /* CEPH_ENTITY_ADDR_TYPE_* */ |
---|
65 | 65 | __le32 nonce; /* unique id for process (e.g. pid) */ |
---|
66 | 66 | struct sockaddr_storage in_addr; |
---|
67 | 67 | } __attribute__ ((packed)); |
---|
68 | 68 | |
---|
| 69 | +static inline bool ceph_addr_equal_no_type(const struct ceph_entity_addr *lhs, |
---|
| 70 | + const struct ceph_entity_addr *rhs) |
---|
| 71 | +{ |
---|
| 72 | + return !memcmp(&lhs->in_addr, &rhs->in_addr, sizeof(lhs->in_addr)) && |
---|
| 73 | + lhs->nonce == rhs->nonce; |
---|
| 74 | +} |
---|
| 75 | + |
---|
69 | 76 | struct ceph_entity_inst { |
---|
70 | 77 | struct ceph_entity_name name; |
---|
71 | 78 | struct ceph_entity_addr addr; |
---|