|
@@ -302,7 +302,7 @@ void setnonblocking(int sock) {
|
|
|
/*
|
|
|
Generic checksum calculation function
|
|
|
*/
|
|
|
-unsigned short csum(const unsigned short *ptr,int nbytes) {
|
|
|
+unsigned short csum(const unsigned short *ptr,int nbytes) {//works both for big and little endian
|
|
|
register long sum;
|
|
|
unsigned short oddbyte;
|
|
|
register short answer;
|
|
@@ -325,6 +325,7 @@ unsigned short csum(const unsigned short *ptr,int nbytes) {
|
|
|
return(answer);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
int set_buf_size(int fd)
|
|
|
{
|
|
|
if(setsockopt(fd, SOL_SOCKET, SO_SNDBUFFORCE, &socket_buf_size, sizeof(socket_buf_size))<0)
|