* Winsock call to UNIX
@ 1999-09-30 14:52 Zhang, John
1999-09-30 19:01 ` Todd Goodman
1999-09-30 23:42 ` Zhang, John
0 siblings, 2 replies; 7+ messages in thread
From: Zhang, John @ 1999-09-30 14:52 UTC (permalink / raw)
To: cygwin
I installed Be 20.1, finished porting on NT 40. compiled with
libwinsock32.a.
Now the socket calls work fine on NT when a client and a server talking to
each other.
But when calling from NT to a UNIX (server or client), sockets never go
thru, i.e. a ported application cannot talk to the original UNIX
application.
Any comment will be appreciated.
John
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Winsock call to UNIX
1999-09-30 14:52 Winsock call to UNIX Zhang, John
@ 1999-09-30 19:01 ` Todd Goodman
1999-09-30 23:42 ` Todd Goodman
1999-09-30 23:42 ` Zhang, John
1 sibling, 1 reply; 7+ messages in thread
From: Todd Goodman @ 1999-09-30 19:01 UTC (permalink / raw)
To: 'Zhang, John', cygwin
Do you have the proper htons()/ntohs() and htonl()/ntohl() calls
around the ports and addresses?
> -----Original Message-----
> From: cygwin-owner@sourceware.cygnus.com
> [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Zhang, John
> Sent: Thursday, September 30, 1999 5:57 PM
> To: cygwin@sourceware.cygnus.com
> Subject: Winsock call to UNIX
>
>
> I installed Be 20.1, finished porting on NT 40. compiled with
> libwinsock32.a.
> Now the socket calls work fine on NT when a client and a
> server talking to
> each other.
> But when calling from NT to a UNIX (server or client),
> sockets never go
> thru, i.e. a ported application cannot talk to the original UNIX
> application.
> Any comment will be appreciated.
>
> John
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Winsock call to UNIX
1999-09-30 19:01 ` Todd Goodman
@ 1999-09-30 23:42 ` Todd Goodman
0 siblings, 0 replies; 7+ messages in thread
From: Todd Goodman @ 1999-09-30 23:42 UTC (permalink / raw)
To: 'Zhang, John', cygwin
Do you have the proper htons()/ntohs() and htonl()/ntohl() calls
around the ports and addresses?
> -----Original Message-----
> From: cygwin-owner@sourceware.cygnus.com
> [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Zhang, John
> Sent: Thursday, September 30, 1999 5:57 PM
> To: cygwin@sourceware.cygnus.com
> Subject: Winsock call to UNIX
>
>
> I installed Be 20.1, finished porting on NT 40. compiled with
> libwinsock32.a.
> Now the socket calls work fine on NT when a client and a
> server talking to
> each other.
> But when calling from NT to a UNIX (server or client),
> sockets never go
> thru, i.e. a ported application cannot talk to the original UNIX
> application.
> Any comment will be appreciated.
>
> John
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Winsock call to UNIX
1999-09-30 14:52 Winsock call to UNIX Zhang, John
1999-09-30 19:01 ` Todd Goodman
@ 1999-09-30 23:42 ` Zhang, John
1 sibling, 0 replies; 7+ messages in thread
From: Zhang, John @ 1999-09-30 23:42 UTC (permalink / raw)
To: cygwin
I installed Be 20.1, finished porting on NT 40. compiled with
libwinsock32.a.
Now the socket calls work fine on NT when a client and a server talking to
each other.
But when calling from NT to a UNIX (server or client), sockets never go
thru, i.e. a ported application cannot talk to the original UNIX
application.
Any comment will be appreciated.
John
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Winsock call to UNIX
1999-10-01 2:34 ` Corinna Vinschen
@ 1999-10-31 19:54 ` Corinna Vinschen
0 siblings, 0 replies; 7+ messages in thread
From: Corinna Vinschen @ 1999-10-31 19:54 UTC (permalink / raw)
To: Erik Hensema; +Cc: 'Zhang, John', cygwin
Erik Hensema wrote:
> [...]
> You should use the htons() and htonl() functions on win32 in order to
> correct the little/big endian problem.
Paranoid correction:
Use htons/htonl and ntohs/ntohl not only on win32 but on
_each_ system! If you ignore it only because you know, that
the endian problem doesn't exist on your system (by chance),
you'll never get portable code.
Regards,
Corinna
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Winsock call to UNIX
1999-09-30 23:42 Erik Hensema
@ 1999-10-01 2:34 ` Corinna Vinschen
1999-10-31 19:54 ` Corinna Vinschen
0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 1999-10-01 2:34 UTC (permalink / raw)
To: Erik Hensema; +Cc: 'Zhang, John', cygwin
Erik Hensema wrote:
> [...]
> You should use the htons() and htonl() functions on win32 in order to
> correct the little/big endian problem.
Paranoid correction:
Use htons/htonl and ntohs/ntohl not only on win32 but on
_each_ system! If you ignore it only because you know, that
the endian problem doesn't exist on your system (by chance),
you'll never get portable code.
Regards,
Corinna
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Winsock call to UNIX
@ 1999-09-30 23:42 Erik Hensema
1999-10-01 2:34 ` Corinna Vinschen
0 siblings, 1 reply; 7+ messages in thread
From: Erik Hensema @ 1999-09-30 23:42 UTC (permalink / raw)
To: 'Zhang, John', cygwin
> -----Original Message-----
> From: Zhang, John [ mailto:John.Zhang@neonsoft.com ]
>
> I installed Be 20.1, finished porting on NT 40. compiled with
> libwinsock32.a.
> Now the socket calls work fine on NT when a client and a
> server talking to
> each other.
> But when calling from NT to a UNIX (server or client),
> sockets never go
> thru, i.e. a ported application cannot talk to the original UNIX
> application.
Maybe a little/big endian issue? You cannot use constructions like this:
char *buf[SIZE];
int x;
/* read in the buffer here */
memcpy((void *)&x, buf+X_OFFSET, sizeof(int)); /* WRONG! */
You should use the htons() and htonl() functions on win32 in order to
correct the little/big endian problem.
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1999-10-31 19:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-30 14:52 Winsock call to UNIX Zhang, John
1999-09-30 19:01 ` Todd Goodman
1999-09-30 23:42 ` Todd Goodman
1999-09-30 23:42 ` Zhang, John
1999-09-30 23:42 Erik Hensema
1999-10-01 2:34 ` Corinna Vinschen
1999-10-31 19:54 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).