comp.lang.ada
 help / color / mirror / Atom feed
* Socket & Multicast problems / GNAT.Sockets
@ 2019-11-05 19:06 Shark8
  2019-11-05 19:10 ` Shark8
  2019-11-05 19:57 ` Dmitry A. Kazakov
  0 siblings, 2 replies; 5+ messages in thread
From: Shark8 @ 2019-11-05 19:06 UTC (permalink / raw)


Ok, I have a system at work that is using custom methods, both TCP and UDP, and multicast / unicast. Now, I am getting stumped with the GNAT.Sockets translation of the equivalent connections, probably because I've not used Sockets before and most of the examples I've tried haven't worked.

Most of the messages can, I think, be mapped out to Ada's records fairly easily but that's getting ahead of myself — what I'm having trouble with is getting a socket to receive from the proper multicast address[es] — there is a note in the GNAT.Sockets example [which isn't working] that joining a multicast-group has to be set as an option subsequent to binding the socket when running on Windows.

(Is there a better package/library for operating on sockets? I've done a little searching, but I haven't found anything that looks particularly good.)


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

* Re: Socket & Multicast problems / GNAT.Sockets
  2019-11-05 19:06 Socket & Multicast problems / GNAT.Sockets Shark8
@ 2019-11-05 19:10 ` Shark8
  2019-11-05 19:57 ` Dmitry A. Kazakov
  1 sibling, 0 replies; 5+ messages in thread
From: Shark8 @ 2019-11-05 19:10 UTC (permalink / raw)


There is a Java-utility that reads the messages of the system, I don't know if it will help; but if needed I can post the source [Java] for portions of it.

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

* Re: Socket & Multicast problems / GNAT.Sockets
  2019-11-05 19:06 Socket & Multicast problems / GNAT.Sockets Shark8
  2019-11-05 19:10 ` Shark8
@ 2019-11-05 19:57 ` Dmitry A. Kazakov
  2019-11-05 20:11   ` Shark8
  1 sibling, 1 reply; 5+ messages in thread
From: Dmitry A. Kazakov @ 2019-11-05 19:57 UTC (permalink / raw)


On 2019-11-05 20:06, Shark8 wrote:

> Most of the messages can, I think, be mapped out to Ada's records fairly easily but that's getting ahead of myself — what I'm having trouble with is getting a socket to receive from the proper multicast address[es] — there is a note in the GNAT.Sockets example [which isn't working] that joining a multicast-group has to be set as an option subsequent to binding the socket when running on Windows.

Did you check this:

https://stackoverflow.com/questions/58151208/receiving-multicast-traffic-using-gnat-sockets

> (Is there a better package/library for operating on sockets? I've done a little searching, but I haven't found anything that looks particularly good.)

GNAT.Sockets is medium to thin bindings. There are sources so you can 
check yourself what GNAT.Socket does relatively easily. You can also 
extend it sometimes. For example, there is no SocketCAN support there, 
but that works anyway.

P.S. I don't know what the example above does exactly. E.g. if it 
configures an IGMP group and runs PGM on it. Is it PGM what you want to use?

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

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

* Re: Socket & Multicast problems / GNAT.Sockets
  2019-11-05 19:57 ` Dmitry A. Kazakov
@ 2019-11-05 20:11   ` Shark8
  2019-11-05 20:45     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 5+ messages in thread
From: Shark8 @ 2019-11-05 20:11 UTC (permalink / raw)


On Tuesday, November 5, 2019 at 12:57:07 PM UTC-7, Dmitry A. Kazakov wrote:
> On 2019-11-05 20:06, Shark8 wrote:
> 
> > Most of the messages can, I think, be mapped out to Ada's records fairly easily but that's getting ahead of myself — what I'm having trouble with is getting a socket to receive from the proper multicast address[es] — there is a note in the GNAT.Sockets example [which isn't working] that joining a multicast-group has to be set as an option subsequent to binding the socket when running on Windows.
> 
> Did you check this:
> 
> https://stackoverflow.com/questions/58151208/receiving-multicast-traffic-using-gnat-sockets
Ah, I had not seen this one; but I did look around on StackOverflow.

> 
> P.S. I don't know what the example above does exactly. E.g. if it 
> configures an IGMP group and runs PGM on it. Is it PGM what you want to use?
No, I don't think so.
It's essentially a custom protocol / message-system used at a particular installation of the NSO.


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

* Re: Socket & Multicast problems / GNAT.Sockets
  2019-11-05 20:11   ` Shark8
@ 2019-11-05 20:45     ` Dmitry A. Kazakov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry A. Kazakov @ 2019-11-05 20:45 UTC (permalink / raw)


On 2019-11-05 21:11, Shark8 wrote:
> On Tuesday, November 5, 2019 at 12:57:07 PM UTC-7, Dmitry A. Kazakov wrote:
>> On 2019-11-05 20:06, Shark8 wrote:
>>
>>> Most of the messages can, I think, be mapped out to Ada's records fairly easily but that's getting ahead of myself — what I'm having trouble with is getting a socket to receive from the proper multicast address[es] — there is a note in the GNAT.Sockets example [which isn't working] that joining a multicast-group has to be set as an option subsequent to binding the socket when running on Windows.
>>
>> Did you check this:
>>
>> https://stackoverflow.com/questions/58151208/receiving-multicast-traffic-using-gnat-sockets
> Ah, I had not seen this one; but I did look around on StackOverflow.
> 
>>
>> P.S. I don't know what the example above does exactly. E.g. if it
>> configures an IGMP group and runs PGM on it. Is it PGM what you want to use?
> No, I don't think so.
> It's essentially a custom protocol / message-system used at a particular installation of the NSO.

PGM is a stream-oriented multicast just like TCP is stream-oriented 
unicast. You put your protocol on top of it.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


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

end of thread, other threads:[~2019-11-05 20:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 19:06 Socket & Multicast problems / GNAT.Sockets Shark8
2019-11-05 19:10 ` Shark8
2019-11-05 19:57 ` Dmitry A. Kazakov
2019-11-05 20:11   ` Shark8
2019-11-05 20:45     ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox