home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / programm / 5343 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.6 KB  |  44 lines

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!uknet!mucs!m1!qinyi
  2. From: qinyi@uk.ac.man.cs (Yi Qin (BCW PhD))
  3. Newsgroups: comp.unix.programmer
  4. Subject: UDP packt size limit (SunOS4.1)
  5. Message-ID: <QINYI.92Nov18184428@r6m.uk.ac.man.cs>
  6. Date: 18 Nov 92 18:44:28 GMT
  7. Sender: news@cs.man.ac.uk
  8. Organization: University of Manchester, UK
  9. Lines: 33
  10.  
  11.  
  12. Hello.
  13.  
  14. It seems to me that this UDP packet size limit is not documented
  15. in any manual or references for SunOS 4.1. So far as I understand,
  16. the UDP layer only does very simple header treatment of IP packets
  17. and does not break the IP packet. So the UDP maximum packet size
  18. should be the same as that of IP packets, being 65535.
  19.  
  20. Now I face the following situation. If I define the size of a data-
  21. gram packet to be 9008 (9000 * sizeof(char) + 2 * sizeof(int)). The call 
  22. to sendto() returns with an error saying message to long. When I
  23. sendto() and recvfrom() a message of size 8816, it works OK for me.
  24. The intereting thing is, when I use the size of 8817 (8809 + 8),
  25. the message is recvfrom()'ed (the number of bytes returned is the
  26. same as that indicated in the message (one of the integer fields),
  27. but the value of the last integer is not as sent. The message is
  28. organised as 
  29.  
  30. struct mesg {
  31.     int  mesg_size;
  32.     char mesg_body[MAXMESG];
  33.     int  mesg_sequence;
  34. };
  35.  
  36. I am using two Sparc1 workstations, and don't use any byte ordering
  37. routine. Could someone tell me if the situation I have is something
  38. normal with the UDP implementation?
  39.  
  40. Thanks in advance
  41.  
  42. Yi Qin
  43. qinyi@cs.man.ac.uk
  44.