Searched refs:ibuf (Results 1 - 25 of 301) sorted by relevance

1234567891011>>

/openbsd-current/lib/libutil/
H A Dimsg.h31 struct ibuf { struct
32 TAILQ_ENTRY(ibuf) entry;
42 TAILQ_HEAD(, ibuf) bufs;
76 struct ibuf *buf;
82 struct ibuf *ibuf_open(size_t);
83 struct ibuf *ibuf_dynamic(size_t, size_t);
84 int ibuf_add(struct ibuf *, const void *, size_t);
85 int ibuf_add_buf(struct ibuf *, const struct ibuf *);
86 int ibuf_add_ibuf(struct ibuf *, cons
[all...]
H A Dimsg-buffer.c35 static int ibuf_realloc(struct ibuf *, size_t);
36 static void ibuf_enqueue(struct msgbuf *, struct ibuf *);
37 static void ibuf_dequeue(struct msgbuf *, struct ibuf *);
40 struct ibuf *
43 struct ibuf *buf;
49 if ((buf = calloc(1, sizeof(struct ibuf))) == NULL)
61 struct ibuf *
64 struct ibuf *buf;
71 if ((buf = calloc(1, sizeof(struct ibuf))) == NULL)
87 ibuf_realloc(struct ibuf *bu
[all...]
/openbsd-current/sbin/iked/
H A Ddh.h52 int (*exchange2)(struct dh_group *, struct ibuf **, struct ibuf *);
54 int (*shared2)(struct dh_group *, struct ibuf **, struct ibuf *);
65 int dh_create_exchange(struct dh_group *, struct ibuf **, struct ibuf *);
66 int dh_create_shared(struct dh_group *, struct ibuf **, struct ibuf *);
H A Dimsg_util.c39 struct ibuf *
42 struct ibuf *buf;
66 struct ibuf *
73 ibuf_length(struct ibuf *buf)
80 struct ibuf *
81 ibuf_getdata(struct ibuf *buf, size_t len)
83 struct ibuf tmp;
91 struct ibuf *
92 ibuf_dup(struct ibuf *buf)
99 struct ibuf *
[all...]
H A Diked.h59 struct imsgbuf ibuf; member in struct:imsgev
188 struct ibuf *csa_encrkey; /* encryption key */
191 struct ibuf *csa_integrkey; /* auth key */
313 struct ibuf *hash_key; /* MAC key derived from key seed */
326 struct ibuf *encr_key; /* MAC key derived from key seed */
327 struct ibuf *encr_iv; /* Initialization Vector */
339 struct ibuf *dsa_keydata; /* public, private or shared key */
349 struct ibuf *id_buf;
376 struct ibuf *kex_inonce; /* Ni */
377 struct ibuf *kex_rnonc
[all...]
/openbsd-current/usr.sbin/radiusd/
H A Dimsg_subr.c36 imsg_sync_read(struct imsgbuf *ibuf, int millisec) argument
41 fds[0].fd = ibuf->fd;
49 return imsg_read(ibuf);
59 imsg_sync_flush(struct imsgbuf *ibuf, int millisec) argument
64 if (!ibuf->w.queued)
67 fds[0].fd = ibuf->fd;
75 return imsg_flush(ibuf);
H A Dradiusd_bsdauth.c45 struct imsgbuf ibuf; member in struct:module_bsdauth
84 struct imsgbuf ibuf; local
116 imsg_init(&ibuf, pairsock[0]);
122 if ((n = imsg_read(&ibuf)) <= 0 && errno != EAGAIN)
125 if ((n = imsg_get(&ibuf, &imsg)) == -1)
159 imsg_compose(&ibuf, (authok)
214 imsg_compose(&ibuf, (group_ok)
221 imsg_flush(&ibuf);
223 imsg_flush(&ibuf);
225 imsg_clear(&ibuf);
[all...]
/openbsd-current/regress/lib/libc/vis/
H A Dvis_test.c14 char ibuf[NCH]; variable
64 arc4random_buf(ibuf, sizeof(ibuf) - 1);
65 ibuf[sizeof(ibuf) - 1] = '\0';
69 owant = sizeof(ibuf);
70 o = strnvis(obuf, ibuf, owant, flags[j]);
73 o = strnvis(obuf, ibuf, owant, flags[j]);
82 } else if (o > strlen(ibuf) * 4) {
85 o, strlen(ibuf) *
[all...]
/openbsd-current/usr.sbin/dhcpd/
H A Dconvert.c64 u_int32_t ibuf; local
66 memcpy(&ibuf, buf, sizeof(ibuf));
67 return (ntohl(ibuf));
73 u_int16_t ibuf; local
75 memcpy(&ibuf, buf, sizeof(ibuf));
76 return (ntohs(ibuf));
/openbsd-current/usr.sbin/smtpd/
H A Dscheduler_proc.c25 static struct imsgbuf ibuf; variable in typeref:struct:imsgbuf
35 if (imsg_flush(&ibuf) == -1) {
41 if ((n = imsg_get(&ibuf, &imsg)) == -1) {
56 if ((n = imsg_read(&ibuf)) == -1 && errno != EAGAIN) {
107 imsg_init(&ibuf, fd);
110 imsg_compose(&ibuf, PROC_SCHEDULER_INIT, 0, 0, -1,
126 imsg_compose(&ibuf, PROC_SCHEDULER_INSERT, 0, 0, -1, si, sizeof(*si));
142 imsg_compose(&ibuf, PROC_SCHEDULER_COMMIT, 0, 0, -1,
159 imsg_compose(&ibuf, PROC_SCHEDULER_ROLLBACK, 0, 0, -1,
176 imsg_compose(&ibuf, PROC_SCHEDULER_UPDAT
[all...]
H A Dqueue_proc.c26 static struct imsgbuf ibuf; variable in typeref:struct:imsgbuf
36 if (imsg_flush(&ibuf) == -1) {
42 if ((n = imsg_get(&ibuf, &imsg)) == -1) {
57 if ((n = imsg_read(&ibuf)) == -1 && errno != EAGAIN) {
103 imsg_compose(&ibuf, PROC_QUEUE_CLOSE, 0, 0, -1, NULL, 0);
117 imsg_compose(&ibuf, PROC_QUEUE_MESSAGE_CREATE, 0, 0, -1, NULL, 0);
139 imsg_compose(&ibuf, PROC_QUEUE_MESSAGE_COMMIT, 0, 0, fd, &msgid,
154 imsg_compose(&ibuf, PROC_QUEUE_MESSAGE_DELETE, 0, 0, -1, &msgid,
167 imsg_compose(&ibuf, PROC_QUEUE_MESSAGE_FD_R, 0, 0, -1, &msgid,
180 struct ibuf *
[all...]
/openbsd-current/usr.sbin/ldapd/
H A Dimsgev.c40 imsg_init(&iev->ibuf, fd);
49 event_set(&iev->ev, iev->ibuf.fd, iev->events, iev->handler, iev);
59 r = imsg_compose(&iev->ibuf, type, peerid, pid, fd, data, datalen);
77 msgbuf_clear(&iev->ibuf.w);
78 close(iev->ibuf.fd);
88 if (iev->ibuf.w.queued || iev->terminate)
97 event_set(&iev->ev, iev->ibuf.fd, iev->events, iev->handler, iev);
105 struct imsgbuf *ibuf = &iev->ibuf; local
112 if ((n = imsg_read(ibuf))
[all...]
/openbsd-current/usr.sbin/ractl/
H A Dractl.c46 struct imsgbuf *ibuf; variable in typeref:struct:imsgbuf
101 if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
103 imsg_init(ibuf, ctl_sock);
112 imsg_compose(ibuf, IMSG_CTL_LOG_VERBOSE, 0, 0, -1,
118 imsg_compose(ibuf, IMSG_CTL_RELOAD, 0, 0, -1, NULL, 0);
126 while (ibuf->w.queued)
127 if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN)
131 if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
137 if ((n = imsg_get(ibuf, &imsg)) == -1)
150 free(ibuf);
[all...]
/openbsd-current/usr.sbin/dhcp6leasectl/
H A Ddhcp6leasectl.c52 struct imsgbuf *ibuf; variable in typeref:struct:imsgbuf
123 if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
125 imsg_init(ibuf, ctl_sock);
128 imsg_compose(ibuf, IMSG_CTL_SEND_REQUEST, 0, 0, -1,
130 while (ibuf->w.queued)
131 if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN)
137 imsg_compose(ibuf, IMSG_CTL_SHOW_INTERFACE_INFO, 0, 0, -1,
140 while (ibuf->w.queued)
141 if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN)
145 if ((n = imsg_read(ibuf))
[all...]
/openbsd-current/usr.sbin/ikectl/
H A Dikectl.c70 struct imsgbuf *ibuf; variable in typeref:struct:imsgbuf
248 if (res->ibuf != NULL)
249 ibuf = res->ibuf;
251 if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
253 imsg_init(ibuf, ctl_sock);
291 imsg_compose(ibuf, IMSG_CTL_RESET, 0, 0, -1, &v, sizeof(v));
295 imsg_compose(ibuf, IMSG_CTL_RELOAD, 0, 0, -1,
299 imsg_compose(ibuf, IMSG_CTL_RESET_ID, 0, 0, -1,
303 imsg_compose(ibuf, IMSG_CTL_SHOW_S
[all...]
/openbsd-current/usr.sbin/ospfctl/
H A Dospfctl.c46 struct imsgbuf *ibuf; variable in typeref:struct:imsgbuf
107 if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
109 imsg_init(ibuf, ctl_sock);
119 imsg_compose(ibuf, IMSG_CTL_SHOW_SUM, 0, 0, -1, NULL, 0);
128 imsg_compose(ibuf, IMSG_CTL_SHOW_INTERFACE, 0, 0, -1,
133 imsg_compose(ibuf, IMSG_CTL_SHOW_NBR, 0, 0, -1, NULL, 0);
136 imsg_compose(ibuf, IMSG_CTL_SHOW_DATABASE, 0, 0, -1, NULL, 0);
139 imsg_compose(ibuf, IMSG_CTL_SHOW_DATABASE, 0, 0, -1,
143 imsg_compose(ibuf, IMSG_CTL_SHOW_DB_EXT, 0, 0, -1, NULL, 0);
146 imsg_compose(ibuf, IMSG_CTL_SHOW_DB_NE
[all...]
/openbsd-current/usr.sbin/rpki-client/
H A Dio.c37 struct ibuf *
40 struct ibuf *b;
52 io_simple_buffer(struct ibuf *b, const void *res, size_t sz)
62 io_buf_buffer(struct ibuf *b, const void *p, size_t sz)
75 io_str_buffer(struct ibuf *b, const char *p)
86 io_close_buffer(struct msgbuf *msgbuf, struct ibuf *b)
96 * Read of an ibuf and extract sz byte from there.
101 io_read_buf(struct ibuf *b, void *res, size_t sz)
115 io_read_str(struct ibuf *b, char **res)
136 io_read_buf_alloc(struct ibuf *
[all...]
/openbsd-current/regress/lib/libutil/imsg/
H A Dibuf_test.c29 struct ibuf *buf;
41 struct ibuf *buf;
56 struct ibuf *buf;
82 struct ibuf *buf;
/openbsd-current/usr.sbin/eigrpd/
H A Deigrpe.h29 struct ibuf *buf;
130 void rtp_send_ucast(struct nbr *, struct ibuf *);
131 void rtp_send(struct eigrp_iface *, struct nbr *, struct ibuf *);
138 int gen_eigrp_hdr(struct ibuf *, uint16_t, uint8_t, uint32_t,
141 struct ibuf *);
145 int gen_parameter_tlv(struct ibuf *, struct eigrp_iface *,
147 int gen_sequence_tlv(struct ibuf *,
149 int gen_sw_version_tlv(struct ibuf *);
150 int gen_mcast_seq_tlv(struct ibuf *, uint32_t);
152 int gen_route_tlv(struct ibuf *, struc
[all...]
/openbsd-current/usr.bin/mail/
H A Dquit.c67 FILE *ibuf = NULL, *obuf, *fbuf, *rbuf, *abuf; local
202 if ((ibuf = Fopen(tempname, "r")) == NULL) {
218 (void)Fclose(ibuf);
229 (void)Fclose(ibuf);
247 (void)Fclose(ibuf);
260 rewind(ibuf);
261 c = getc(ibuf);
266 c = getc(ibuf);
268 (void)Fclose(ibuf);
393 FILE *obuf, *ibuf; local
[all...]
/openbsd-current/usr.sbin/npppd/npppd/
H A Dcontrol.c140 control_close(c->iev.ibuf.fd, cs);
190 imsg_init(&c->iev.ibuf, connfd);
194 event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
207 if (c->iev.ibuf.fd == fd)
224 msgbuf_clear(&c->iev.ibuf.w);
228 close(c->iev.ibuf.fd);
255 if (msgbuf_write(&c->iev.ibuf.w) <= 0 && errno != EAGAIN) {
259 if (!c->iev.ibuf.w.queued)
260 npppd_ctl_imsg_compose(c->ctx, &c->iev.ibuf);
266 if (((n = imsg_read(&c->iev.ibuf))
[all...]
/openbsd-current/usr.sbin/unwindctl/
H A Dunwindctl.c54 struct imsgbuf *ibuf; variable in typeref:struct:imsgbuf
130 if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
132 imsg_init(ibuf, ctl_sock);
157 imsg_compose(ibuf, IMSG_CTL_LOG_VERBOSE, 0, 0, -1,
163 imsg_compose(ibuf, IMSG_CTL_RELOAD, 0, 0, -1, NULL, 0);
168 imsg_compose(ibuf, IMSG_CTL_STATUS, 0, 0, -1, NULL, 0);
171 imsg_compose(ibuf, IMSG_CTL_AUTOCONF, 0, 0, -1, NULL, 0);
174 imsg_compose(ibuf, IMSG_CTL_MEM, 0, 0, -1, NULL, 0);
180 while (ibuf->w.queued)
181 if (msgbuf_write(&ibuf
[all...]
/openbsd-current/usr.sbin/ripd/
H A Dcontrol.c146 imsg_init(&c->iev.ibuf, connfd);
149 event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
162 if (c->iev.ibuf.fd == fd)
175 if (c->iev.ibuf.pid == pid)
192 msgbuf_clear(&c->iev.ibuf.w);
196 close(c->iev.ibuf.fd);
222 if (((n = imsg_read(&c->iev.ibuf)) == -1 && errno != EAGAIN) ||
229 if (msgbuf_write(&c->iev.ibuf.w) <= 0 && errno != EAGAIN) {
236 if ((n = imsg_get(&c->iev.ibuf, &imsg)) == -1) {
251 imsg_compose(&c->iev.ibuf, IMSG_CTL_EN
[all...]
H A Dripd.c238 imsg_init(&iev_ripe->ibuf, pipe_parent2ripe[0]);
240 imsg_init(&iev_rde->ibuf, pipe_parent2rde[0]);
245 event_set(&iev_ripe->ev, iev_ripe->ibuf.fd, iev_ripe->events,
250 event_set(&iev_rde->ev, iev_rde->ibuf.fd, iev_rde->events,
273 msgbuf_clear(&iev_ripe->ibuf.w);
274 close(iev_ripe->ibuf.fd);
275 msgbuf_clear(&iev_rde->ibuf.w);
276 close(iev_rde->ibuf.fd);
310 struct imsgbuf *ibuf = &iev->ibuf; local
389 struct imsgbuf *ibuf = &iev->ibuf; local
[all...]
/openbsd-current/regress/sbin/iked/parser/
H A Dcommon.c23 int ikev2_send_ike_e(struct iked *, struct iked_sa *, struct ibuf *,
51 struct ibuf *
52 ikev2_msg_decrypt(struct iked *, struct iked_sa *, struct ibuf *,
53 struct ibuf *);
69 ikev2_send_ike_e(struct iked *env, struct iked_sa *sa, struct ibuf *buf,
193 struct ibuf *
195 struct ibuf *msg, struct ibuf *src)

Completed in 279 milliseconds

1234567891011>>