Home
last modified time | relevance | path

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

12

/openbsd/src/lib/libutil/
Dimsg-buffer.c35 struct msgbuf { struct
47 static void msgbuf_read_enqueue(struct msgbuf *, struct ibuf *); argument
48 static void msgbuf_enqueue(struct msgbuf *, struct ibuf *);
49 static void msgbuf_dequeue(struct msgbuf *, struct ibuf *);
50 static void msgbuf_drain(struct msgbuf *, size_t);
387 ibuf_close(struct msgbuf *msgbuf, struct ibuf *buf) in ibuf_close() argument
389 msgbuf_enqueue(msgbuf, buf); in ibuf_close()
562 struct msgbuf *
565 struct msgbuf *msgbuf; in msgbuf_new() local
567 if ((msgbuf = calloc(1, sizeof(*msgbuf))) == NULL) in msgbuf_new()
[all …]
Dimsg.h41 struct msgbuf;
44 struct msgbuf *w;
94 void ibuf_close(struct msgbuf *, struct ibuf *);
112 struct msgbuf *msgbuf_new(void);
113 struct msgbuf *msgbuf_new_reader(size_t,
115 void msgbuf_free(struct msgbuf *);
116 void msgbuf_clear(struct msgbuf *);
117 uint32_t msgbuf_queuelen(struct msgbuf *);
118 int ibuf_write(int, struct msgbuf *);
119 int msgbuf_write(int, struct msgbuf *);
[all …]
/openbsd/src/sys/dev/pci/
Dixgbe_vf.c213 uint32_t msgbuf[IXGBE_VF_PERMADDR_MSG_LEN]; in ixgbe_reset_hw_vf() local
214 uint8_t *addr = (uint8_t *)(&msgbuf[1]); in ixgbe_reset_hw_vf()
247 msgbuf[0] = IXGBE_VF_RESET; in ixgbe_reset_hw_vf()
248 ixgbe_write_mbx(hw, msgbuf, 1, 0); in ixgbe_reset_hw_vf()
257 ret_val = ixgbe_poll_mbx(hw, msgbuf, in ixgbe_reset_hw_vf()
262 if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_SUCCESS) && in ixgbe_reset_hw_vf()
263 msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_FAILURE)) in ixgbe_reset_hw_vf()
266 if (msgbuf[0] == (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_SUCCESS)) in ixgbe_reset_hw_vf()
269 hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD]; in ixgbe_reset_hw_vf()
342 uint32_t msgbuf[3]; in ixgbe_set_rar_vf() local
[all …]
/openbsd/src/usr.bin/rdist/
Dmessage.c270 static char ebuf[BUFSIZ], msgbuf[MSGBUFSIZ]; in msgparseopts() local
279 (void) strlcpy(msgbuf, msgstr, sizeof(msgbuf)); in msgparseopts()
284 for (optstr = strtok(msgbuf, ":"); optstr; in msgparseopts()
325 msgsendstdout(struct msgfacility *msgfac, int mtype, int flags, char *msgbuf) in msgsendstdout() argument
343 (void) sendcmd(cmd, "%s", msgbuf); in msgsendstdout()
348 if (msgbuf && *msgbuf) { in msgsendstdout()
349 (void) fprintf(stderr, "%s\n", msgbuf); in msgsendstdout()
366 if (msgbuf && *msgbuf) { in msgsendstdout()
367 (void) printf("%s\n", msgbuf); in msgsendstdout()
379 msgsendsyslog(struct msgfacility *msgfac, int mtype, int flags, char *msgbuf) in msgsendsyslog() argument
[all …]
/openbsd/src/sbin/iked/
Dikev2_pld.c147 uint8_t *msgbuf = ibuf_data(msg->msg_data); in ikev2_validate_pld() local
156 memcpy(pld, msgbuf + offset, sizeof(*pld)); in ikev2_validate_pld()
190 uint8_t *msgbuf = ibuf_data(msg->msg_data); in ikev2_pld_payloads() local
269 print_hex(msgbuf, offset, in ikev2_pld_payloads()
296 uint8_t *msgbuf = ibuf_data(msg->msg_data); in ikev2_validate_sa() local
304 memcpy(sap, msgbuf + offset, sizeof(*sap)); in ikev2_validate_sa()
348 uint8_t *msgbuf = ibuf_data(msg->msg_data); in ikev2_pld_sa() local
380 memcpy(&spi32, msgbuf + offset, 4); in ikev2_pld_sa()
384 memcpy(&spi64, msgbuf + offset, 8); in ikev2_pld_sa()
462 uint8_t *msgbuf = ibuf_data(msg->msg_data); in ikev2_validate_xform() local
[all …]
/openbsd/src/sys/sys/
Dmsgbuf.h41 struct msgbuf { struct
52 extern struct msgbuf *msgbufp; argument
53 extern struct msgbuf *consbufp;
57 void msgbuf_putchar(struct msgbuf *, const char c);
/openbsd/src/usr.bin/ssh/
Dlog.c310 char msgbuf[MSGBUFSIZ]; in do_log() local
357 vsnprintf(msgbuf, sizeof(msgbuf), fmtbuf, args); in do_log()
359 vsnprintf(msgbuf, sizeof(msgbuf), fmt, args); in do_log()
362 snprintf(fmtbuf, sizeof(fmtbuf), "%s: %s", msgbuf, suffix); in do_log()
363 strlcpy(msgbuf, fmtbuf, sizeof(msgbuf)); in do_log()
365 strnvis(fmtbuf, msgbuf, sizeof(fmtbuf), VIS_SAFE|VIS_OCTAL); in do_log()
373 snprintf(msgbuf, sizeof msgbuf, "%s%s%.*s\r\n", in do_log()
376 (int)sizeof msgbuf - 3, fmtbuf); in do_log()
377 (void)write(log_stderr_fd, msgbuf, strlen(msgbuf)); in do_log()
/openbsd/src/libexec/comsat/
Dcomsat.c83 char msgbuf[100]; in main() local
108 (void) recv(0, msgbuf, sizeof(msgbuf) - 1, 0); in main()
113 (void) recv(0, msgbuf, sizeof(msgbuf) - 1, 0); in main()
138 cc = recv(0, msgbuf, sizeof(msgbuf) - 1, 0); in main()
149 msgbuf[cc] = '\0'; in main()
151 mailfor(msgbuf); in main()
/openbsd/src/sys/kern/
Dsubr_log.c88 struct msgbuf *msgbufp; /* the mapped buffer, itself. */
89 struct msgbuf *consbufp; /* console message buffer. */
120 size_t msgbuf_getlen(struct msgbuf *);
121 void msgbuf_putchar_locked(struct msgbuf *, const char);
126 struct msgbuf *mbp; in initmsgbuf()
130 if (bufsize < sizeof(struct msgbuf)) in initmsgbuf()
133 mbp = msgbufp = (struct msgbuf *)buf; in initmsgbuf()
135 new_bufs = bufsize - offsetof(struct msgbuf, msg_bufc); in initmsgbuf()
168 consbufp->msg_bufs = CONSBUFSIZE - offsetof(struct msgbuf, msg_bufc); in initconsbuf()
172 msgbuf_putchar(struct msgbuf *mbp, const char c) in msgbuf_putchar()
[all …]
/openbsd/src/sys/dev/ic/
Dosiopvar.h112 u_int8_t msgbuf[8]; member
127 #define OSIOP_DSMSGOFF OSIOP_DSOFF(msgbuf[0])
128 #define OSIOP_DSMSGINOFF OSIOP_DSOFF(msgbuf[1])
129 #define OSIOP_DSEXTMSGOFF OSIOP_DSOFF(msgbuf[2])
130 #define OSIOP_DSSYNMSGOFF OSIOP_DSOFF(msgbuf[3])
Dosiop.c978 ds->msgbuf[0] = ds->msgbuf[1] = MSG_INVALID;
998 ds->msgbuf[2] = MSG_INVALID;
1148 if (ds->msgbuf[1] == MSG_INVALID)
1151 else if (ds->msgbuf[1] == MSG_MESSAGE_REJECT)
1166 if (ds->msgbuf[0] != MSG_CMDCOMPLETE)
1168 sc->sc_dev.dv_xname, ds->msgbuf[0]);
1184 if (ds->msgbuf[1] == MSG_EXTENDED &&
1185 ds->msgbuf[2] == MSG_EXT_SDTR_LEN &&
1186 ds->msgbuf[3] == MSG_EXT_SDTR) {
1192 ds->msgbuf[0], ds->msgbuf[1],
[all …]
/openbsd/src/usr.sbin/rpki-client/
Dio.c88 io_close_buffer(struct msgbuf *msgbuf, struct ibuf *b) in io_close_buffer() argument
96 ibuf_close(msgbuf, b); in io_close_buffer()
179 io_buf_get(struct msgbuf *msgq) in io_buf_get()
Dextern.h658 struct msgbuf;
904 void io_close_buffer(struct msgbuf *, struct ibuf *);
909 struct ibuf *io_buf_get(struct msgbuf *);
Drsync.c229 struct msgbuf *msgq; in proc_rsync()
Dfilemode.c678 parse_file(struct entityq *q, struct msgbuf *msgq) in parse_file()
728 struct msgbuf *msgq; in proc_filemode()
/openbsd/src/sbin/dmesg/
Ddmesg.c67 struct msgbuf cur; in main()
105 msgbufsize += offsetof(struct msgbuf, msg_bufc); in main()
120 bufdata = ((struct msgbuf *)bufdata)->msg_bufc; in main()
123 struct msgbuf *bufp; in main()
/openbsd/src/lib/libz/
Dgzlib.c32 wchar_t *msgbuf; in gz_strwinerror() local
39 (LPVOID)&msgbuf, in gz_strwinerror()
45 && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { in gz_strwinerror()
47 msgbuf[chars] = 0; in gz_strwinerror()
52 msgbuf[chars] = 0; in gz_strwinerror()
55 wcstombs(buf, msgbuf, chars + 1); // assumes buf is big enough in gz_strwinerror()
56 LocalFree(msgbuf); in gz_strwinerror()
/openbsd/src/games/hack/
Dhack.eat.c327 static char msgbuf[BUFSZ]; in doeat() local
328 (void) snprintf(msgbuf, sizeof msgbuf, in doeat()
331 nomovemsg = msgbuf; in doeat()
/openbsd/src/usr.sbin/npppd/pppoe/
Dpppoe_session.c290 u_char bufspace[2048], msgbuf[80]; in pppoe_session_send_PADS() local
315 msgbuf[0] = '\0'; in pppoe_session_send_PADS()
324 strlcpy(msgbuf, service_name->value, in pppoe_session_send_PADS()
325 MINIMUM(len + 1, sizeof(msgbuf))); in pppoe_session_send_PADS()
350 "hostUniq=%s", msgbuf, in pppoe_session_send_PADS()
/openbsd/src/gnu/usr.bin/perl/cpan/Win32/
DWin32.xs1157 char msgbuf[ONE_K_BUFSIZE]; local
1164 msgbuf, sizeof(msgbuf)-1, NULL))
1166 XSRETURN_PV(msgbuf);
1715 WCHAR msgbuf[ONE_K_BUFSIZE]; local
1875 ZeroMemory(&msgbuf, ONE_K_BUFSIZE * 2);
1879 msgbuf,
1983 ZeroMemory(&msgbuf, ONE_K_BUFSIZE * 2);
1988 msgbuf,
1991 wcsncpy(msgbuf, L"unable to format error message", ONE_K_BUFSIZE - 1);
2005 ST(1) = wstr_to_sv(aTHX_ msgbuf);
/openbsd/src/regress/usr.sbin/rpki-client/
Dtest-http.c16 static struct msgbuf *httpq;
/openbsd/src/gnu/usr.bin/perl/cpan/IPC-SysV/t/
Dipcsysv.t183 my $msgbuf = '';
184 if (msgrcv($msg, $msgbuf, 256, 0, IPC_NOWAIT)) {
200 ($rmsgtype, $rmsgtext) = unpack("L$N a*", $msgbuf);
/openbsd/src/usr.sbin/bgpd/
Dsession.h212 struct msgbuf *wbuf;
/openbsd/src/sys/arch/alpha/alpha/
Dgenassym.cf36 include <sys/msgbuf.h>
/openbsd/src/usr.bin/dig/lib/isc/unix/
Dsocket.c250 char msgbuf[2048]; in socket_log() local
258 vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap); in socket_log()
263 "socket %p: %s", sock, msgbuf); in socket_log()
267 "socket %p %s: %s", sock, peerbuf, msgbuf); in socket_log()

12