Lines Matching refs:p
85 int ceph_entity_name_encode(const char *name, void **p, void *end) in ceph_entity_name_encode() argument
89 if (*p + 2*sizeof(u32) + len > end) in ceph_entity_name_encode()
91 ceph_encode_32(p, CEPH_ENTITY_TYPE_CLIENT); in ceph_entity_name_encode()
92 ceph_encode_32(p, len); in ceph_entity_name_encode()
93 ceph_encode_copy(p, name, len); in ceph_entity_name_encode()
104 void *p = monhdr + 1, *end = buf + len, *lenp; in ceph_auth_build_hello() local
114 ceph_encode_32(&p, 0); /* no protocol, yet */ in ceph_auth_build_hello()
116 lenp = p; in ceph_auth_build_hello()
117 p += sizeof(u32); in ceph_auth_build_hello()
119 ceph_decode_need(&p, end, 1 + sizeof(u32), bad); in ceph_auth_build_hello()
120 ceph_encode_8(&p, 1); in ceph_auth_build_hello()
122 ceph_encode_32(&p, num); in ceph_auth_build_hello()
123 ceph_decode_need(&p, end, num * sizeof(u32), bad); in ceph_auth_build_hello()
125 ceph_encode_32(&p, supported_protocols[i]); in ceph_auth_build_hello()
127 ret = ceph_entity_name_encode(ac->name, &p, end); in ceph_auth_build_hello()
130 ceph_decode_need(&p, end, sizeof(u64), bad); in ceph_auth_build_hello()
131 ceph_encode_64(&p, ac->global_id); in ceph_auth_build_hello()
133 ceph_encode_32(&lenp, p - lenp - sizeof(u32)); in ceph_auth_build_hello()
134 ret = p - buf; in ceph_auth_build_hello()
148 void *p = monhdr + 1; in ceph_build_auth_request() local
156 ceph_encode_32(&p, ac->protocol); in ceph_build_auth_request()
158 ret = ac->ops->build_request(ac, p + sizeof(u32), end); in ceph_build_auth_request()
165 ceph_encode_32(&p, ret); in ceph_build_auth_request()
166 ret = p + ret - msg_buf; in ceph_build_auth_request()
178 void *p = buf; in ceph_handle_auth_reply() local
190 dout("handle_auth_reply %p %p\n", p, end); in ceph_handle_auth_reply()
191 ceph_decode_need(&p, end, sizeof(u32) * 3 + sizeof(u64), bad); in ceph_handle_auth_reply()
192 protocol = ceph_decode_32(&p); in ceph_handle_auth_reply()
193 result = ceph_decode_32(&p); in ceph_handle_auth_reply()
194 global_id = ceph_decode_64(&p); in ceph_handle_auth_reply()
195 payload_len = ceph_decode_32(&p); in ceph_handle_auth_reply()
196 payload = p; in ceph_handle_auth_reply()
197 p += payload_len; in ceph_handle_auth_reply()
198 ceph_decode_need(&p, end, sizeof(u32), bad); in ceph_handle_auth_reply()
199 result_msg_len = ceph_decode_32(&p); in ceph_handle_auth_reply()
200 result_msg = p; in ceph_handle_auth_reply()
201 p += result_msg_len; in ceph_handle_auth_reply()
202 if (p != end) in ceph_handle_auth_reply()