public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* AF_HYPERV address family not supported
@ 2019-07-04 17:23 Biswapriyo Nath
  2019-07-04 18:50 ` Brian Inglis
  2019-07-10 18:41 ` Biswapriyo Nath
  0 siblings, 2 replies; 4+ messages in thread
From: Biswapriyo Nath @ 2019-07-04 17:23 UTC (permalink / raw)
  To: cygwin

Here is the sample code that I've tried.

#include <sys/socket.h>
#include <stdio.h>
#include <errno.h>

#ifndef AF_HYPERV
#define AF_HYPERV 34
#endif

int main(void)
{
int s = socket(AF_HYPERV, SOCK_STREAM, 0);
   if (s > 0)
       printf("success\n");
   else
       printf("%s\n", strerror(errno));
}

Is this by-design? Or am I doing anything wrong?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AF_HYPERV address family not supported
  2019-07-04 17:23 AF_HYPERV address family not supported Biswapriyo Nath
@ 2019-07-04 18:50 ` Brian Inglis
  2019-07-10 18:41 ` Biswapriyo Nath
  1 sibling, 0 replies; 4+ messages in thread
From: Brian Inglis @ 2019-07-04 18:50 UTC (permalink / raw)
  To: cygwin

On 2019-07-04 11:23, Biswapriyo Nath wrote:
> Here is the sample code that I've tried.
> 
> #include <sys/socket.h>
> #include <stdio.h>
> #include <errno.h>
> 
> #ifndef AF_HYPERV
> #define AF_HYPERV 34
> #endif
> 
> int main(void)
> {
> int s = socket(AF_HYPERV, SOCK_STREAM, 0);
>    if (s > 0)
>        printf("success\n");
>    else
>        printf("%s\n", strerror(errno));
> }
> 
> Is this by-design? Or am I doing anything wrong?

That's a Windows API - the Linux equivalent is AF_VSOCK: please feel free to
submit support patches to cygwin-patches to support AF_VSOCK using AF_HYPERV or
newlib to support AF_VSOCK.

	https://cygwin.com/acronyms/#SHTDI

You could check to see if the Windows oriented mingw or msys projects support
AF_HYPERV yet.

These interfaces are fairly new and OS specific so there is not yet a facility
abstraction to support.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AF_HYPERV address family not supported
  2019-07-04 17:23 AF_HYPERV address family not supported Biswapriyo Nath
  2019-07-04 18:50 ` Brian Inglis
@ 2019-07-10 18:41 ` Biswapriyo Nath
  2019-07-10 21:52   ` Brian Inglis
  1 sibling, 1 reply; 4+ messages in thread
From: Biswapriyo Nath @ 2019-07-10 18:41 UTC (permalink / raw)
  To: cygwin

Can anyone provide a function calls between cygwin socket() and Windows
socket() as a flowchart? For example, with AF_INET.

In source code (fhandler_socket_inet::socket), I see bunch of function
pointers which seems confusing to me.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AF_HYPERV address family not supported
  2019-07-10 18:41 ` Biswapriyo Nath
@ 2019-07-10 21:52   ` Brian Inglis
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Inglis @ 2019-07-10 21:52 UTC (permalink / raw)
  To: cygwin

On 2019-07-10 12:41, Biswapriyo Nath wrote:
> Can anyone provide a function calls between cygwin socket() and Windows
> socket() as a flowchart? For example, with AF_INET.
> 
> In source code (fhandler_socket_inet::socket), I see bunch of function
> pointers which seems confusing to me.

Most underlying socket handling is asynchronous, event driven, so you might want
to try strace'ing to files some simple uses of Cygwin non-interactive net
utilities e.g bind-utils dig/delv/host/nslookup, inetutils ftp, nc/6, ping/6, or
whatever you have installed that accesses the net.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-10 21:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04 17:23 AF_HYPERV address family not supported Biswapriyo Nath
2019-07-04 18:50 ` Brian Inglis
2019-07-10 18:41 ` Biswapriyo Nath
2019-07-10 21:52   ` Brian Inglis

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).