Lines Matching defs:byte_cnt

74 static int pcp_io_op(void *buf, int byte_cnt, int io_op);
82 static int check_magic_byte_presence(int byte_cnt, uint8_t *byte_val,
89 static int pcp_update_read_area(int byte_cnt);
571 pcp_io_op(void *buf, int byte_cnt, int io_op)
581 if ((buf == NULL) || (byte_cnt < 0)) {
605 while (rv < byte_cnt) {
606 io_sz = MIN((byte_cnt - rv), mtu_size);
626 if (rv == byte_cnt)
689 * Function: write 'byte_cnt' bytes from 'buf' to channel.
692 pcp_write(uint8_t *buf, int byte_cnt)
698 if (buf == NULL || byte_cnt < 0 || byte_cnt > mtu_size) {
705 if ((ret = write(chnl_fd, buf, byte_cnt)) < 0) {
711 if ((ret = vldc_write(chnl_fd, buf, byte_cnt)) <= 0) {
731 pcp_read(uint8_t *buf, int byte_cnt)
736 if (byte_cnt < 0 || byte_cnt > mtu_size) {
758 if (byte_cnt <= (read_tail - read_head)) {
759 (void) memcpy(buf, read_head, byte_cnt);
760 read_head += byte_cnt;
761 return (byte_cnt);
794 m = byte_cnt - (read_tail - read_head);
805 n = MIN(byte_cnt, (read_tail - read_head));
819 pcp_update_read_area(int byte_cnt)
824 if (byte_cnt < 0 || byte_cnt > mtu_size) {
846 if (byte_cnt <= (read_tail - read_head)) {
847 return (byte_cnt);
860 n = byte_cnt - (read_tail - read_head);
871 n = MIN(byte_cnt, (read_tail - read_head));
884 pcp_peek_read(uint8_t *buf, int byte_cnt)
888 if (byte_cnt < 0 || byte_cnt > mtu_size) {
909 if (byte_cnt <= (read_tail - read_head)) {
910 (void) memcpy(buf, read_head, byte_cnt);
911 return (byte_cnt);
937 n = MIN(byte_cnt, (peek_read_tail - peek_read_head));
1249 check_magic_byte_presence(int byte_cnt, uint8_t *byte_seq, int *ispresent)
1254 if ((ret = pcp_peek_read(buf, byte_cnt)) < 0) {
1258 /* 'byte_cnt' bytes not present */
1259 if (ret != byte_cnt) {
1264 for (i = 0; i < byte_cnt; ++i) {