Home
last modified time | relevance | path

Searched refs:buflen (Results 1 – 25 of 25) sorted by relevance

/systemd-251/src/basic/
Dnss-util.h20 char *buffer, size_t buflen, \
27 char *buffer, size_t buflen, \
35 char *buffer, size_t buflen, \
40 char *buffer, size_t buflen, \
48 char *buffer, size_t buflen, \
55 char *buffer, size_t buflen, \
63 char *buffer, size_t buflen, \
69 buffer, buflen, \
77 char *buffer, size_t buflen, \
86 buffer, buflen, \
[all …]
/systemd-251/src/libsystemd-network/
Ddhcp6-option.c214 static int option_append_hdr(uint8_t **buf, size_t *buflen, uint16_t optcode, size_t optlen) { in option_append_hdr() argument
217 assert_return(buflen, -EINVAL); in option_append_hdr()
219 if (optlen > 0xffff || *buflen < optlen + offsetof(DHCP6Option, data)) in option_append_hdr()
226 *buflen -= offsetof(DHCP6Option, data); in option_append_hdr()
231 int dhcp6_option_append(uint8_t **buf, size_t *buflen, uint16_t code, in dhcp6_option_append() argument
237 r = option_append_hdr(buf, buflen, code, optlen); in dhcp6_option_append()
242 *buflen -= optlen; in dhcp6_option_append()
247 int dhcp6_option_append_vendor_option(uint8_t **buf, size_t *buflen, OrderedSet *vendor_options) { in dhcp6_option_append_vendor_option() argument
253 assert(buflen); in dhcp6_option_append_vendor_option()
271 r = dhcp6_option_append(buf, buflen, SD_DHCP6_OPTION_VENDOR_OPTS, total, p); in dhcp6_option_append_vendor_option()
[all …]
Ddhcp6-option.h75 int dhcp6_option_append(uint8_t **buf, size_t *buflen, uint16_t code,
77 int dhcp6_option_append_ia(uint8_t **buf, size_t *buflen, const DHCP6IA *ia);
78 int dhcp6_option_append_fqdn(uint8_t **buf, size_t *buflen, const char *fqdn);
79 int dhcp6_option_append_user_class(uint8_t **buf, size_t *buflen, char * const *user_class);
80 int dhcp6_option_append_vendor_class(uint8_t **buf, size_t *buflen, char * const *user_class);
81 int dhcp6_option_append_vendor_option(uint8_t **buf, size_t *buflen, OrderedSet *vendor_options);
85 size_t buflen,
Dfuzz-dhcp-server-relay.c36 size_t buflen = size; in LLVMFuzzerTestOneInput() local
37buflen += relay_agent_information_length(server->agent_circuit_id, server->agent_remote_id) + 2; in LLVMFuzzerTestOneInput()
38 assert_se(message = malloc(buflen)); in LLVMFuzzerTestOneInput()
44 …id) dhcp_server_relay_message(server, (DHCPMessage *) message, size - sizeof(DHCPMessage), buflen); in LLVMFuzzerTestOneInput()
Dsd-ndisc.c204 ssize_t buflen; in ndisc_recv() local
212 buflen = next_datagram_size_fd(fd); in ndisc_recv()
213 if (buflen < 0) { in ndisc_recv()
214 if (ERRNO_IS_TRANSIENT(buflen) || ERRNO_IS_DISCONNECT(buflen)) in ndisc_recv()
217 … log_ndisc_errno(nd, buflen, "Failed to determine datagram size to read, ignoring: %m"); in ndisc_recv()
221 rt = ndisc_router_new(buflen); in ndisc_recv()
Dtest-dhcp-option.c237 int buflen = 0; in test_options() local
259 buflen = sizeof(DHCPMessage) + optlen; in test_options()
262 … assert_se((res = dhcp_option_parse(message, buflen, test_options_cb, NULL, NULL)) == -ENOMSG); in test_options()
264 … assert_se((res = dhcp_option_parse(message, buflen, test_options_cb, desc, NULL)) >= 0); in test_options()
267 … assert_se((res = dhcp_option_parse(message, buflen, test_options_cb, desc, NULL)) < 0); in test_options()
Ddhcp-option.c276 static int parse_options(const uint8_t options[], size_t buflen, uint8_t *overload, in parse_options() argument
283 while (offset < buflen) { in parse_options()
294 if (buflen < offset + 1) in parse_options()
299 if (buflen < offset + len) in parse_options()
355 if (offset < buflen) in parse_options()
Dsd-radv.c251 ssize_t buflen; in radv_recv() local
258 buflen = next_datagram_size_fd(fd); in radv_recv()
259 if (buflen < 0) { in radv_recv()
260 if (ERRNO_IS_TRANSIENT(buflen) || ERRNO_IS_DISCONNECT(buflen)) in radv_recv()
263 … log_radv_errno(ra, buflen, "Failed to determine datagram size to read, ignoring: %m"); in radv_recv()
267 buf = new0(char, buflen); in radv_recv()
271 r = icmp6_receive(fd, buf, buflen, &src, &timestamp); in radv_recv()
298 if ((size_t) buflen < sizeof(struct nd_router_solicit)) { in radv_recv()
Dsd-dhcp-client.c1901 ssize_t len, buflen; in client_receive_message_udp() local
1906 buflen = next_datagram_size_fd(fd); in client_receive_message_udp()
1907 if (buflen < 0) { in client_receive_message_udp()
1908 if (ERRNO_IS_TRANSIENT(buflen) || ERRNO_IS_DISCONNECT(buflen)) in client_receive_message_udp()
1911 … log_dhcp_client_errno(client, buflen, "Failed to determine datagram size to read, ignoring: %m"); in client_receive_message_udp()
1915 message = malloc0(buflen); in client_receive_message_udp()
1919 len = recv(fd, message, buflen, 0); in client_receive_message_udp()
1994 ssize_t buflen, len; in client_receive_message_raw() local
2000 buflen = next_datagram_size_fd(fd); in client_receive_message_raw()
2001 if (buflen < 0) { in client_receive_message_raw()
[all …]
Dsd-dhcp6-client.c1227 ssize_t buflen, len; in client_receive_message() local
1229 buflen = next_datagram_size_fd(fd); in client_receive_message()
1230 if (buflen < 0) { in client_receive_message()
1231 if (ERRNO_IS_TRANSIENT(buflen) || ERRNO_IS_DISCONNECT(buflen)) in client_receive_message()
1234 … log_dhcp6_client_errno(client, buflen, "Failed to determine datagram size to read, ignoring: %m"); in client_receive_message()
1238 message = malloc(buflen); in client_receive_message()
1242 iov = IOVEC_MAKE(message, buflen); in client_receive_message()
Dsd-dhcp-server.c891 …ver_relay_message(sd_dhcp_server *server, DHCPMessage *message, size_t opt_length, size_t buflen) { in dhcp_server_relay_message() argument
914 … r = append_agent_information_option(server, message, opt_length, buflen - sizeof(DHCPMessage)); in dhcp_server_relay_message()
1290 size_t buflen = datagram_size; in server_receive_message() local
1293buflen += relay_agent_information_length(server->agent_circuit_id, server->agent_remote_id) + 2; in server_receive_message()
1295 message = malloc(buflen); in server_receive_message()
1328 r = dhcp_server_relay_message(server, message, len - sizeof(DHCPMessage), buflen); in server_receive_message()
Ddhcp-internal.h48 int dhcp_option_remove_option(uint8_t *options, size_t buflen, uint8_t option_code);
/systemd-251/src/libsystemd/sd-journal/
Dfsprg.c49 static void mpi_export(void *buf, size_t buflen, const gcry_mpi_t x) { in mpi_export() argument
55 assert(len <= buflen); in mpi_export()
56 memzero(buf, buflen); in mpi_export()
57 gcry_mpi_print(GCRYMPI_FMT_USG, buf + (buflen - len), len, &nwritten, x); in mpi_export()
61 static gcry_mpi_t mpi_import(const void *buf, size_t buflen) { in mpi_import() argument
65 assert_se(gcry_mpi_scan(&h, GCRYMPI_FMT_USG, buf, buflen, NULL) == 0); in mpi_import()
67 assert(len <= buflen); in mpi_import()
73 static void uint64_export(void *buf, size_t buflen, uint64_t x) { in uint64_export() argument
74 assert(buflen == 8); in uint64_export()
85 _pure_ static uint64_t uint64_import(const void *buf, size_t buflen) { in uint64_import() argument
[all …]
/systemd-251/src/shared/
Duser-record-nss.c169 size_t buflen = 4096; in nss_spwd_for_passwd() local
180 buf = malloc(buflen); in nss_spwd_for_passwd()
184 r = getspnam_r(pwd->pw_name, &spwd, buf, buflen, &result); in nss_spwd_for_passwd()
198 if (buflen > SIZE_MAX / 2) in nss_spwd_for_passwd()
201 buflen *= 2; in nss_spwd_for_passwd()
214 size_t buflen = 4096; in nss_user_record_by_name() local
222 buf = malloc(buflen); in nss_user_record_by_name()
226 r = getpwnam_r(name, &pwd, buf, buflen, &result); in nss_user_record_by_name()
239 if (buflen > SIZE_MAX / 2) in nss_user_record_by_name()
242 buflen *= 2; in nss_user_record_by_name()
[all …]
/systemd-251/src/nss-systemd/
Dnss-systemd.c145 char *buffer, size_t buflen, in copy_synthesized_passwd() argument
164 if (buflen < required) { in copy_synthesized_passwd()
187 char *buffer, size_t buflen, in copy_synthesized_spwd() argument
200 if (buflen < required) { in copy_synthesized_spwd()
220 char *buffer, size_t buflen, in copy_synthesized_group() argument
236 if (buflen < ALIGN(required)) { in copy_synthesized_group()
257 char *buffer, size_t buflen, in copy_synthesized_sgrp() argument
270 if (buflen < required) { in copy_synthesized_sgrp()
290 char *buffer, size_t buflen, in _nss_systemd_getpwnam_r() argument
313 return copy_synthesized_passwd(pwd, &root_passwd, buffer, buflen, errnop); in _nss_systemd_getpwnam_r()
[all …]
Duserdb-glue.h13 int nss_pack_user_record(UserRecord *hr, struct passwd *pwd, char *buffer, size_t buflen);
14 …_group_record(GroupRecord *g, char **extra_members, struct group *gr, char *buffer, size_t buflen);
16 int nss_pack_user_record_shadow(UserRecord *hr, struct spwd *spwd, char *buffer, size_t buflen);
17 int nss_pack_group_record_shadow(GroupRecord *hr, struct sgrp *sgrp, char *buffer,size_t buflen);
19 enum nss_status userdb_getpwnam(const char *name, struct passwd *pwd, char *buffer, size_t buflen, …
20 enum nss_status userdb_getpwuid(uid_t uid, struct passwd *pwd, char *buffer, size_t buflen, int *er…
22 enum nss_status userdb_getspnam(const char *name, struct spwd *spwd, char *buffer, size_t buflen, i…
24 enum nss_status userdb_getgrnam(const char *name, struct group *gr, char *buffer, size_t buflen, in…
25 enum nss_status userdb_getgrgid(gid_t gid, struct group *gr, char *buffer, size_t buflen, int *errn…
27 enum nss_status userdb_getsgnam(const char *name, struct sgrp *sgrp, char *buffer, size_t buflen, i…
Duserdb-glue.c27 size_t buflen) { in nss_pack_user_record() argument
49 if (buflen < required) in nss_pack_user_record()
72 char *buffer, size_t buflen, in userdb_getpwnam() argument
92 r = nss_pack_user_record(hr, pwd, buffer, buflen); in userdb_getpwnam()
105 size_t buflen, in userdb_getpwuid() argument
125 r = nss_pack_user_record(hr, pwd, buffer, buflen); in userdb_getpwuid()
138 size_t buflen) { in nss_pack_user_record_shadow() argument
152 if (buflen < required) in nss_pack_user_record_shadow()
181 char *buffer, size_t buflen, in userdb_getspnam() argument
204 r = nss_pack_user_record_shadow(hr, spwd, buffer, buflen); in userdb_getspnam()
[all …]
/systemd-251/src/fundamental/
Dsha256.c93 ctx->buflen = 0; in sha256_init_ctx()
103 uint32_t bytes = ctx->buflen; in sha256_finish_ctx()
137 if (ctx->buflen != 0) { in sha256_process_bytes()
138 size_t left_over = ctx->buflen; in sha256_process_bytes()
142 ctx->buflen += add; in sha256_process_bytes()
144 if (ctx->buflen > 64) { in sha256_process_bytes()
145 sha256_process_block(ctx->buffer, ctx->buflen & ~63, ctx); in sha256_process_bytes()
147 ctx->buflen &= 63; in sha256_process_bytes()
150 ctx->buflen); in sha256_process_bytes()
188 size_t left_over = ctx->buflen; in sha256_process_bytes()
[all …]
Dsha256.h23 uint32_t buflen; member
/systemd-251/src/nss-mymachines/
Dnss-mymachines.c93 char *buffer, size_t buflen, in _nss_mymachines_gethostbyname4_r() argument
158 if (buflen < ms) { in _nss_mymachines_gethostbyname4_r()
244 char *buffer, size_t buflen, in _nss_mymachines_gethostbyname3_r() argument
313 if (buflen < ms) { in _nss_mymachines_gethostbyname3_r()
409 char *buffer, size_t buflen, in _nss_mymachines_getpwnam_r() argument
418 char *buffer, size_t buflen, in _nss_mymachines_getpwuid_r() argument
427 char *buffer, size_t buflen, in _nss_mymachines_getgrnam_r() argument
436 char *buffer, size_t buflen, in _nss_mymachines_getgrgid_r() argument
/systemd-251/src/nss-myhostname/
Dnss-myhostname.c33 char *buffer, size_t buflen, in _nss_myhostname_gethostbyname4_r() argument
100 if (buflen < ms) { in _nss_myhostname_gethostbyname4_r()
184 char *buffer, size_t buflen, in fill_in_hostent() argument
218 if (buflen < ms) { in fill_in_hostent()
318 char *buffer, size_t buflen, in _nss_myhostname_gethostbyname3_r() argument
400 buffer, buflen, in _nss_myhostname_gethostbyname3_r()
414 char *buffer, size_t buflen, in _nss_myhostname_gethostbyaddr2_r() argument
514 buffer, buflen, in _nss_myhostname_gethostbyaddr2_r()
/systemd-251/src/udev/scsi_id/
Dscsi_serial.c271 unsigned char *buf, unsigned buflen) { in scsi_inquiry() argument
273 { INQUIRY_CMD, evpd, page, 0, buflen, 0 }; in scsi_inquiry()
281 if (buflen > SCSI_INQ_BUFF_LEN) in scsi_inquiry()
283 "buflen %d too long", buflen); in scsi_inquiry()
295 io_v4.din_xfer_len = buflen; in scsi_inquiry()
304 io_hdr.dxfer_len = buflen; in scsi_inquiry()
344 retval = buflen; in scsi_inquiry()
/systemd-251/src/libsystemd/sd-device/
Ddevice-monitor.c440 ssize_t buflen, bufpos; in device_monitor_receive_device() local
447 buflen = recvmsg(m->sock, &smsg, 0); in device_monitor_receive_device()
448 if (buflen < 0) { in device_monitor_receive_device()
454 if (buflen < 32 || (smsg.msg_flags & MSG_TRUNC)) in device_monitor_receive_device()
488 if (buf.nlh.properties_off+32 > (size_t) buflen) in device_monitor_receive_device()
491 buf.nlh.properties_off+32, buflen); in device_monitor_receive_device()
501 if ((size_t) bufpos < sizeof("a@/d") || bufpos >= buflen) in device_monitor_receive_device()
511 r = device_new_from_nulstr(&device, (uint8_t*) &buf.raw[bufpos], buflen - bufpos); in device_monitor_receive_device()
/systemd-251/src/nss-resolve/
Dnss-resolve.c229 char *buffer, size_t buflen, in _nss_resolve_gethostbyname4_r() argument
304 if (buflen < ms) { in _nss_resolve_gethostbyname4_r()
381 char *buffer, size_t buflen, in _nss_resolve_gethostbyname3_r() argument
463 if (buflen < ms) { in _nss_resolve_gethostbyname3_r()
590 char *buffer, size_t buflen, in _nss_resolve_gethostbyaddr2_r() argument
666 if (buflen < ms) { in _nss_resolve_gethostbyaddr2_r()
/systemd-251/src/core/
Dmanager.c168 static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos) { in draw_cylon() argument
171 assert(buflen >= CYLON_BUFFER_EXTRA + width + 1); in draw_cylon()