On Apr 7 17:56, Antonio Querubin wrote:
> On Fri, 7 Apr 2006, Dave Korn wrote:
>
> > Should have read the man page instead!
> >
> >> s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
> >> printf("socket = %d\nlength = %d\n", s, len);
> >>
> >> rc = getsockname(s, (struct sockaddr *) &sa, &len);
On Fri, 7 Apr 2006, Dave Korn wrote:
Should have read the man page instead!
s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
printf("socket = %d\nlength = %d\n", s, len);
rc = getsockname(s, (struct sockaddr *) &sa, &len);
http://www.opengroup.org/onlinepubs/007908799/xns/getsockname
On Fri, 7 Apr 2006, Reid Thompson wrote:
well,,, not 'any' other linux system...
$ ./getsockname
socket = -1
length = 16
getsockname rc = -1
returned length = 16
getsockname: Bad file descriptor
That points out an error in getting the raw socket, not in getsockname()
itself. getsockname() c
On 07 April 2006 12:38, Antonio Querubin wrote:
> I've run into a problem where getsockname() doesn't work as expected.
> Below is a test program where it fails under cygwin but runs on any other
> Unix/Linux system. I searched the mail archives for any limitations
Should have read the man pag
Antonio Querubin wrote:
I've run into a problem where getsockname() doesn't work as expected.
Below is a test program where it fails under cygwin but runs on any
other Unix/Linux system. I searched the mail archives for any
limitations
#include
#include
#include
#include
int main() {
I've run into a problem where getsockname() doesn't work as expected.
Below is a test program where it fails under cygwin but runs on any other
Unix/Linux system. I searched the mail archives for any limitations
#include
#include
#include
#include
int main() {
struct sockaddr_in sa;
6 matches
Mail list logo