From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,812965ed29240012,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z6g2000pre.googlegroups.com!not-for-mail From: mockturtle Newsgroups: comp.lang.ada Subject: Making a Inet_Addr_Type out of octects (GNAT.Sockets) Date: Tue, 7 Oct 2008 12:43:13 -0700 (PDT) Organization: http://groups.google.com Message-ID: <910108d9-03a0-4e35-86d2-572501a82906@z6g2000pre.googlegroups.com> NNTP-Posting-Host: 62.101.126.216 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1223408593 22593 127.0.0.1 (7 Oct 2008 19:43:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 7 Oct 2008 19:43:13 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z6g2000pre.googlegroups.com; posting-host=62.101.126.216; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99 User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.52 (X11; Linux i686; U; en),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2271 Date: 2008-10-07T12:43:13-07:00 List-Id: Dear.all, a very simple (almost silly) question whose answer, I fear, is "no."... I have 4 octects (read by a received packet) which rappresent an IP address and I want to convert them into a Inet_Addr_Type (using GNAT.Sockets). Of course I could convert the 4 octects into a string to be given to function Inet_Addr_Type, but it seems a bit "convoluted" (it sounds like the joke about the mathematician's algorithm to make a pot of hot water :-). My question is: there is a function which allows me to do such a conversion in a more direct way? I looked at g-sockets, searching for "Inet_Addr_Type", but I could not find anything. Thank you in advance.