Lines Matching defs:byte_cnt
223 int byte_cnt, int io_op);
229 static int check_magic_byte_presence(tsalarm_softc_t *sc, int byte_cnt,
1053 tsal_pcp_io_op(tsalarm_softc_t *sc, void *buf, int byte_cnt, int io_op)
1062 if ((buf == NULL) || (byte_cnt < 0)) {
1086 while (rv < byte_cnt) {
1087 io_sz = MIN((byte_cnt - rv), sc->mtu_size);
1108 if (rv == byte_cnt)
1163 * Function: write 'byte_cnt' bytes from 'buf' to channel.
1166 tsal_pcp_write(tsalarm_softc_t *sc, uint8_t *buf, int byte_cnt)
1173 if (buf == NULL || byte_cnt < 0 || byte_cnt > sc->mtu_size) {
1179 iov.iov_len = byte_cnt;
1184 uio.uio_resid = byte_cnt;
1189 return (byte_cnt - iov.iov_len);
1201 tsal_pcp_read(tsalarm_softc_t *sc, uint8_t *buf, int byte_cnt)
1209 if (byte_cnt < 0 || byte_cnt > sc->mtu_size) {
1232 if (byte_cnt <= (sc->read_tail - sc->read_head)) {
1233 (void) memcpy(buf, sc->read_head, byte_cnt);
1234 sc->read_head += byte_cnt;
1235 return (byte_cnt);
1275 n = MIN(byte_cnt, (sc->read_tail - sc->read_head));
1290 tsal_pcp_peek_read(tsalarm_softc_t *sc, uint8_t *buf, int byte_cnt)
1296 if (byte_cnt < 0 || byte_cnt > sc->mtu_size) {
1304 if (byte_cnt <= (sc->read_tail - sc->read_head)) {
1305 (void) memcpy(buf, sc->read_head, byte_cnt);
1306 return (byte_cnt);
1340 n = MIN(byte_cnt, (peek_read_tail - peek_read_head));
1598 int byte_cnt, uint8_t *byte_seq, int *ispresent)
1603 if ((ret = tsal_pcp_peek_read(sc, buf, byte_cnt)) < 0) {
1607 /* 'byte_cnt' bytes not present */
1608 if (ret != byte_cnt) {
1613 for (i = 0; i < byte_cnt; ++i) {