Lines Matching defs:buffer
95 static int mkpkt_request(uint8_t *buffer, int opcode, char *path, int mode)
97 buffer[0] = opcode >> 8;
98 buffer[1] = opcode & 0xff;
100 return sprintf((char*) &buffer[2], "%s%c%s", path, 0,
108 static int mkpkt_ack(uint8_t *buffer, uint16_t blockno)
110 buffer[0] = TFTP_OP_ACK >> 8;
111 buffer[1] = TFTP_OP_ACK & 0xff;
112 buffer[2] = blockno >> 8;
113 buffer[3] = blockno & 0xff;
121 static int mkpkt_err(uint8_t *buffer, uint16_t errorcode, char *errormsg)
123 buffer[0] = TFTP_OP_ERR >> 8;
124 buffer[1] = TFTP_OP_ERR & 0xff;
125 buffer[2] = errorcode >> 8;
126 buffer[3] = errorcode & 0xff;
127 strcpy((char*) &buffer[4], errormsg);
192 // Makes data packet through FD from file OFFSET in buffer PACKET of BLOCKNO