|
@@ -1062,7 +1062,6 @@ inet_send(int s, const void *msg, size_t len, int flags)
|
1062
|
1062
|
inet_send(s, msg, len/2, flags);
|
1063
|
1063
|
err=inet_send(s, (const char *)msg+(len/2),
|
1064
|
1064
|
len-(len/2), flags);
|
1065
|
|
- error("\nEMSGSIZE inet_send testing.\n");
|
1066
|
1065
|
break;
|
1067
|
1066
|
|
1068
|
1067
|
default:
|
|
@@ -1110,29 +1109,22 @@ inet_sendto(int s, const void *msg, size_t len, int flags,
|
1110
|
1109
|
const struct sockaddr * to, socklen_t tolen)
|
1111
|
1110
|
{
|
1112
|
1111
|
ssize_t err;
|
1113
|
|
- /* How are these last two arguments used when the function being called
|
1114
|
|
- * doesn't have those arguments? */
|
1115
|
1112
|
if ((err = sendto(s, msg, len, flags, to, tolen)) == -1) {
|
1116
|
|
- error("sendto errno: %d err is: %d", errno, err);
|
|
1113
|
+ error("sendto: %s err is: %d", strerror(errno), err);
|
1117
|
1114
|
switch (errno) {
|
1118
|
1115
|
case EMSGSIZE:
|
1119
|
|
- error("Packet artificially fragmented: %d", stderr);
|
1120
|
|
- error("\nData Length: %u", len);
|
1121
|
1116
|
inet_sendto(s, msg, len/2, flags, to, tolen);
|
1122
|
1117
|
err=inet_sendto(s, (const char *)msg+(len/2),
|
1123
|
1118
|
len-(len/2), flags, to, tolen);
|
1124
|
|
- error("\nsendto error after fragmention is: %d, err is: %d\n", errno, err);
|
1125
|
1119
|
break;
|
1126
|
1120
|
case EFAULT:
|
1127
|
|
- error("The value of to is: %d", to);
|
|
1121
|
+ error("The value of to is: %d and %s", to, strerror(errno));
|
1128
|
1122
|
default:
|
1129
|
1123
|
error("inet_sendto: Cannot send(): %s", strerror(errno));
|
1130
|
1124
|
return err;
|
1131
|
1125
|
break;
|
1132
|
1126
|
}
|
1133
|
1127
|
|
1134
|
|
- error("\nSuccessfully sent packet, errno: %d\n", errno);
|
1135
|
|
-
|
1136
|
1128
|
}
|
1137
|
1129
|
return err;
|
1138
|
1130
|
}
|