Lines Matching defs:value

31 static int ndr_write_int16(struct ndr *n, __u16 value)
33 if (n->length <= n->offset + sizeof(value)) {
36 ret = try_to_realloc_ndr_blob(n, sizeof(value));
41 *(__le16 *)ndr_get_field(n) = cpu_to_le16(value);
42 n->offset += sizeof(value);
46 static int ndr_write_int32(struct ndr *n, __u32 value)
48 if (n->length <= n->offset + sizeof(value)) {
51 ret = try_to_realloc_ndr_blob(n, sizeof(value));
56 *(__le32 *)ndr_get_field(n) = cpu_to_le32(value);
57 n->offset += sizeof(value);
61 static int ndr_write_int64(struct ndr *n, __u64 value)
63 if (n->length <= n->offset + sizeof(value)) {
66 ret = try_to_realloc_ndr_blob(n, sizeof(value));
71 *(__le64 *)ndr_get_field(n) = cpu_to_le64(value);
72 n->offset += sizeof(value);
76 static int ndr_write_bytes(struct ndr *n, void *value, size_t sz)
86 memcpy(ndr_get_field(n), value, sz);
91 static int ndr_write_string(struct ndr *n, char *value)
95 sz = strlen(value) + 1;
104 memcpy(ndr_get_field(n), value, sz);
110 static int ndr_read_string(struct ndr *n, void *value, size_t sz)
118 if (value)
119 memcpy(value, ndr_get_field(n), len);
126 static int ndr_read_bytes(struct ndr *n, void *value, size_t sz)
131 if (value)
132 memcpy(value, ndr_get_field(n), sz);
137 static int ndr_read_int16(struct ndr *n, __u16 *value)
142 if (value)
143 *value = le16_to_cpu(*(__le16 *)ndr_get_field(n));
148 static int ndr_read_int32(struct ndr *n, __u32 *value)
153 if (value)
154 *value = le32_to_cpu(*(__le32 *)ndr_get_field(n));
159 static int ndr_read_int64(struct ndr *n, __u64 *value)
164 if (value)
165 *value = le64_to_cpu(*(__le64 *)ndr_get_field(n));