source: rtems/c/src/lib/libbsp/i386/ts_386ex/tools/network_ada/adasockets/sockets-multicast.ads @ 8aefe83

4.104.114.84.95
Last change on this file since 8aefe83 was 1d4048b2, checked in by Joel Sherrill <joel.sherrill@…>, on 08/11/99 at 23:45:57

Patch from Tony R. Ambardar <tonya@…>:

I'm attaching a big patch for the ts_386ex BSP which adds and includes
the following:

1) Conversion to ELF format + minor code cleanups + documentation.

2) An Ada95 binding to FreeBSD sockets, based on Samuel Tardieu's

adasockets-0.1.3 package. This includes some sample applications.

3) Some Ada and C interfaces to add serial-port debugging to

programs. Comes with examples, too; the Ada one shows how
transparent adding the support can be. Note that Rosimildo sent me
the original C code.

The network stuff is not BSP specific, and could be added to your Ada
code collection. The debugging stuff is specific to the i386. Right
now, everything sits in my "tools" directory.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1-----------------------------------------------------------------------------
2--                                                                         --
3--                         ADASOCKETS COMPONENTS                           --
4--                                                                         --
5--                   S O C K E T S . M U L T I C A S T                     --
6--                                                                         --
7--                                S p e c                                  --
8--                                                                         --
9--                        $ReleaseVersion: 0.1.3 $                         --
10--                                                                         --
11--  Copyright (C) 1998  École Nationale Supérieure des Télécommunications  --
12--                                                                         --
13--   AdaSockets is free software; you can  redistribute it and/or modify   --
14--   it  under terms of the GNU  General  Public License as published by   --
15--   the Free Software Foundation; either version 2, or (at your option)   --
16--   any later version.   AdaSockets is distributed  in the hope that it   --
17--   will be useful, but WITHOUT ANY  WARRANTY; without even the implied   --
18--   warranty of MERCHANTABILITY   or FITNESS FOR  A PARTICULAR PURPOSE.   --
19--   See the GNU General Public  License  for more details.  You  should   --
20--   have received a copy of the  GNU General Public License distributed   --
21--   with AdaSockets; see   file COPYING.  If  not,  write  to  the Free   --
22--   Software  Foundation, 59   Temple Place -   Suite  330,  Boston, MA   --
23--   02111-1307, USA.                                                      --
24--                                                                         --
25--   As a special exception, if  other  files instantiate generics  from   --
26--   this unit, or  you link this  unit with other  files to produce  an   --
27--   executable,  this  unit does  not  by  itself cause  the  resulting   --
28--   executable to be  covered by the  GNU General Public License.  This   --
29--   exception does  not  however invalidate any  other reasons  why the   --
30--   executable file might be covered by the GNU Public License.           --
31--                                                                         --
32--   The main repository for this software is located at:                  --
33--       http://www-inf.enst.fr/ANC/                                       --
34--                                                                         --
35-----------------------------------------------------------------------------
36
37with Sockets.Thin;
38
39package Sockets.Multicast is
40
41   pragma Elaborate_Body;
42
43   --  This package aims at helping the creation of multicast sockets
44
45   type Multicast_Socket_FD is new Socket_FD with private;
46
47   function Create_Multicast_Socket
48     (Group     : String;
49      Port      : Positive;
50      TTL       : Positive := 16;
51      Self_Loop : Boolean  := True)
52     return Multicast_Socket_FD;
53   --  Create a multicast socket
54
55   procedure Send (Socket : in Multicast_Socket_FD;
56                   Data   : in Ada.Streams.Stream_Element_Array);
57   --  Send data over a multicast socket
58
59private
60
61   procedure Socket
62     (Sock   : out Multicast_Socket_FD;
63      Domain : in Socket_Domain := AF_INET;
64      Typ    : in Socket_Type   := SOCK_STREAM);
65   --  Do not call this one, it will raise Program_Error
66
67   type Multicast_Socket_FD is new Socket_FD with record
68      Target : Sockets.Thin.Sockaddr_In;
69   end record;
70
71end Sockets.Multicast;
Note: See TracBrowser for help on using the repository browser.