Mail Archives: djgpp/2001/01/21/20:36:29
This is a multi-part message in MIME format.
--------------050204080307080105090505
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Richard Dawe wrote:
> Hello.
>
>
>
> Sahab Yazdani wrote:
>
[snip]
>
>
> What did you change? Why is the data no longer garbled? Knowing this could
>
> help fix your other problems.
I decreased the size of the MassacreHeader packet by 6 bytes by
decreasing the size of the "header" value to 4 bytes instead of 10, this
seems to fix it, cuz it only needs 1 pass to read the data no matter what.
>
>
>
>
[snip]
> What type of sockets are you creating - TCP/IP or UDP/IP? E.g. are you
>
> using:
>
>
>
> - socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) for TCP/IP;
I am using this one.
>
> - or socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP) for UDP/IP?
>
>
>
> (Actually, you should use PF_INET instead of AF_INET.)
>
>
>
> You should be able to send your headers in one packet, since they are
>
> small.
>
>
>
>
>> as a side note, when I print out the error using either lsck_perror or
>
>> perror, i get this message "RETRIEVE1: Resource temporarily not
>
>> available (EAGAIN)" over and over again with a stray "RETREIVE2: " " " "
>
>> popping in there sometimes (only when data is being sent over the
>
>> network).
>
>
>
> Which version of Windows are you using? Do you have Winsock 2 installed?
I am using Windows 98 with WinSock 2 installed (obviously).
>
> What does the libsocket demo program demo/diag.exe display? You can
>
> capture its output like so:
>
>
>
> redir -eo diag.exe > diag.out
included as attachment
>
>
>
> I've never seen this error, but other people have reported it. Perhaps it
>
> only occurs with a small packet size? Strange. I would like to know why
>
> that happens.
>
>
>
> [snip]
>
>
>> MassacreHeader CreateHeader( unsigned char packetType, unsigned char multiples ) {
>
>> MassacreHeader retType;
>
>>
>
>> strcpy(retType.header, "MASS" );
>
>
>
> Since retType.Header is a 4 char array, this will overflow the buffer and
>
> overwrite retType.packetType, because "MASS" is 5 bytes - 'MASS\0'. If you
>
> want space for the nul terminator, make header a 5 char array.
changed it...
thank you.
>
>
>
> I still can't see anything wrong with the rest of your code.
>
>
>
> Bye,
--
***********************************************************
* Sahab Yazdani * "Wizard's Third Rule: Passion rules *
* Thornhill S.S * Reason." - Kolo's Journal *
***********************************************************
* http://pheonixsoft.virtualave.net/ *
***********************************************************
--------------050204080307080105090505
Content-Type: text/plain;
name="diag.out"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="diag.out"
perror(): Address family not supported (EAFNOSUPPORT)
libsocket Diagnostic Program
Copyright (C) 1997, 1998 by Indrek Mandre, 1997-2000 by Richard Dawe
libsocket version 0.8.0
Host name: 'matrix'
Domain name: ''
Configuration directory: 'e:/djgpp/contrib/ls080'
DNS servers: None found
Interface Coda SOCK.VXD
Address 127.0.0.1 netmask 255.0.0.0
---
Address 0.0.0.0 netmask 0.0.0.0
---
Address 192.168.1.1 netmask 255.255.255.0 gateway 192.168.1.1
---
Interface Unix->mailslot
Testing Internet domain (AF_INET) sockets...
+ SUPPORTED: stream type socket with default (0) protocol
. Unsupported: stream type socket with ICMP protocol
+ SUPPORTED: stream type socket with TCP protocol
. Unsupported: stream type socket with UDP protocol
. Unsupported: stream type socket with raw protocol
+ SUPPORTED: datagram type socket with default (0) protocol
. Unsupported: datagram type socket with ICMP protocol
. Unsupported: datagram type socket with TCP protocol
+ SUPPORTED: datagram type socket with UDP protocol
. Unsupported: datagram type socket with raw protocol
. Unsupported: raw type socket with default (0) protocol
. Unsupported: raw type socket with ICMP protocol
. Unsupported: raw type socket with TCP protocol
. Unsupported: raw type socket with UDP protocol
. Unsupported: raw type socket with raw protocol
. Unsupported: sequential type socket with default (0) protocol
. Unsupported: sequential type socket with ICMP protocol
. Unsupported: sequential type socket with TCP protocol
. Unsupported: sequential type socket with UDP protocol
. Unsupported: sequential type socket with raw protocol
Testing Unix domain (AF_UNIX) sockets...
+ SUPPORTED: stream type socket with default (0) protocol
. Unsupported: stream type socket with ICMP protocol
. Unsupported: stream type socket with TCP protocol
. Unsupported: stream type socket with UDP protocol
. Unsupported: stream type socket with raw protocol
+ SUPPORTED: datagram type socket with default (0) protocol
. Unsupported: datagram type socket with ICMP protocol
. Unsupported: datagram type socket with TCP protocol
. Unsupported: datagram type socket with UDP protocol
. Unsupported: datagram type socket with raw protocol
. Unsupported: raw type socket with default (0) protocol
. Unsupported: raw type socket with ICMP protocol
. Unsupported: raw type socket with TCP protocol
. Unsupported: raw type socket with UDP protocol
. Unsupported: raw type socket with raw protocol
. Unsupported: sequential type socket with default (0) protocol
. Unsupported: sequential type socket with ICMP protocol
. Unsupported: sequential type socket with TCP protocol
. Unsupported: sequential type socket with UDP protocol
. Unsupported: sequential type socket with raw protocol
These should be meaningful error messages:
strerror(): Address family not supported (EAFNOSUPPORT)
--------------050204080307080105090505--
- Raw text -