Lines Matching refs:addr
11 struct ceph_entity_addr *addr) in ceph_decode_entity_addr_versioned() argument
26 ceph_decode_copy_safe(p, end, &addr->type, sizeof(addr->type), bad); in ceph_decode_entity_addr_versioned()
28 ceph_decode_copy_safe(p, end, &addr->nonce, sizeof(addr->nonce), bad); in ceph_decode_entity_addr_versioned()
31 if (addr_len > sizeof(addr->in_addr)) in ceph_decode_entity_addr_versioned()
34 memset(&addr->in_addr, 0, sizeof(addr->in_addr)); in ceph_decode_entity_addr_versioned()
36 ceph_decode_copy_safe(p, end, &addr->in_addr, addr_len, bad); in ceph_decode_entity_addr_versioned()
38 addr->in_addr.ss_family = in ceph_decode_entity_addr_versioned()
39 le16_to_cpu((__force __le16)addr->in_addr.ss_family); in ceph_decode_entity_addr_versioned()
51 struct ceph_entity_addr *addr) in ceph_decode_entity_addr_legacy() argument
62 addr->type = CEPH_ENTITY_ADDR_TYPE_LEGACY; in ceph_decode_entity_addr_legacy()
63 ceph_decode_copy_safe(p, end, &addr->nonce, sizeof(addr->nonce), bad); in ceph_decode_entity_addr_legacy()
64 memset(&addr->in_addr, 0, sizeof(addr->in_addr)); in ceph_decode_entity_addr_legacy()
65 ceph_decode_copy_safe(p, end, &addr->in_addr, in ceph_decode_entity_addr_legacy()
66 sizeof(addr->in_addr), bad); in ceph_decode_entity_addr_legacy()
67 addr->in_addr.ss_family = in ceph_decode_entity_addr_legacy()
68 be16_to_cpu((__force __be16)addr->in_addr.ss_family); in ceph_decode_entity_addr_legacy()
75 ceph_decode_entity_addr(void **p, void *end, struct ceph_entity_addr *addr) in ceph_decode_entity_addr() argument
81 return ceph_decode_entity_addr_versioned(p, end, addr); in ceph_decode_entity_addr()
83 return ceph_decode_entity_addr_legacy(p, end, addr); in ceph_decode_entity_addr()
96 struct ceph_entity_addr *addr) in ceph_decode_entity_addrvec() argument
130 memcpy(addr, &tmp_addr, sizeof(*addr)); in ceph_decode_entity_addrvec()
170 int ceph_entity_addr_encoding_len(const struct ceph_entity_addr *addr) in ceph_entity_addr_encoding_len() argument
172 sa_family_t family = get_unaligned(&addr->in_addr.ss_family); in ceph_entity_addr_encoding_len()
178 void ceph_encode_entity_addr(void **p, const struct ceph_entity_addr *addr) in ceph_encode_entity_addr() argument
180 sa_family_t family = get_unaligned(&addr->in_addr.ss_family); in ceph_encode_entity_addr()
184 ceph_start_encoding(p, 1, 1, sizeof(addr->type) + in ceph_encode_entity_addr()
185 sizeof(addr->nonce) + in ceph_encode_entity_addr()
187 ceph_encode_copy(p, &addr->type, sizeof(addr->type)); in ceph_encode_entity_addr()
188 ceph_encode_copy(p, &addr->nonce, sizeof(addr->nonce)); in ceph_encode_entity_addr()
192 ceph_encode_copy(p, addr->in_addr.__data, addr_len - sizeof(family)); in ceph_encode_entity_addr()