Lines Matching defs:obj
29 xdr_encode_netobj(__be32 *p, const struct xdr_netobj *obj)
31 unsigned int quadlen = XDR_QUADLEN(obj->len);
34 *p++ = cpu_to_be32(obj->len);
35 memcpy(p, obj->data, obj->len);
36 return p + XDR_QUADLEN(obj->len);
41 xdr_decode_netobj(__be32 *p, struct xdr_netobj *obj)
47 obj->len = len;
48 obj->data = (u8 *) p;
1877 void *obj, unsigned int len)
1882 memcpy(obj, subbuf->head[0].iov_base, this_len);
1884 obj += this_len;
1886 _copy_from_pages(obj, subbuf->pages, subbuf->page_base, this_len);
1888 obj += this_len;
1890 memcpy(obj, subbuf->tail[0].iov_base, this_len);
1893 /* obj is assumed to point to allocated memory of size at least len: */
1895 void *obj, unsigned int len)
1903 __read_bytes_from_xdr_buf(&subbuf, obj, len);
1909 void *obj, unsigned int len)
1914 memcpy(subbuf->head[0].iov_base, obj, this_len);
1916 obj += this_len;
1918 _copy_to_pages(subbuf->pages, subbuf->page_base, obj, this_len);
1920 obj += this_len;
1922 memcpy(subbuf->tail[0].iov_base, obj, this_len);
1925 /* obj is assumed to point to allocated memory of size at least len: */
1927 void *obj, unsigned int len)
1935 __write_bytes_to_xdr_buf(&subbuf, obj, len);
1940 int xdr_decode_word(const struct xdr_buf *buf, unsigned int base, u32 *obj)
1945 status = read_bytes_from_xdr_buf(buf, base, &raw, sizeof(*obj));
1948 *obj = be32_to_cpu(raw);
1953 int xdr_encode_word(const struct xdr_buf *buf, unsigned int base, u32 obj)
1955 __be32 raw = cpu_to_be32(obj);
1957 return write_bytes_to_xdr_buf(buf, base, &raw, sizeof(obj));