* RFC2348 says between 8 and 65464,
* but our implementation makes it impossible
* to use blocksizes smaller than 22 octets.
*/
* RFC2348 says between 8 and 65464,
* but our implementation makes it impossible
* to use blocksizes smaller than 22 octets.
*/
- const char *remotefile, int localfd, const int port, int tftp_bufsize)
+ const char *remotefile, int localfd, const unsigned short port, int tftp_bufsize)
bind(socketfd, (struct sockaddr *)&sa, len);
sa.sin_family = host->h_addrtype;
bind(socketfd, (struct sockaddr *)&sa, len);
sa.sin_family = host->h_addrtype;
#endif
if (sendto(socketfd, buf, len, 0,
(struct sockaddr *) &sa, sizeof(sa)) < 0) {
#endif
if (sendto(socketfd, buf, len, 0,
(struct sockaddr *) &sa, sizeof(sa)) < 0) {
- printf("received %d bytes: %04x %04x\n", len, opcode, tmp);
+ fprintf(stderr, "received %d bytes: %04x %04x\n", len, opcode, tmp);
}
if(localfile && strcmp(localfile, "-") == 0) {
fd = fileno((cmd==tftp_cmd_get)? stdout : stdin);
}
if(localfile && strcmp(localfile, "-") == 0) {
fd = fileno((cmd==tftp_cmd_get)? stdout : stdin);
- printf("using server \"%s\", remotefile \"%s\", "
+ fprintf(stderr, "using server \"%s\", remotefile \"%s\", "
result = tftp(cmd, host, remotefile, fd, port, blocksize);
#ifdef CONFIG_FEATURE_CLEAN_UP
result = tftp(cmd, host, remotefile, fd, port, blocksize);
#ifdef CONFIG_FEATURE_CLEAN_UP