File src/tcpipmodel/SocketMessages.msg

Contains:

//
// (C) 2004-2005 by Institute of Telematics, University of Karlsruhe
// (C) 2006 Andras Varga
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//


cplusplus {{
#include <bsd.mod/omnet/externs.h>
}};

struct bsd_sockaddr;

enum S_CODES
{
    S_SOCKET        = 1;
    S_SOCKET_RETURN = 2;
    S_LISTEN        = 3;
    S_CONNECT       = 4;
};

message Socket_socket
{
   fields:
      int domain;
      int type;
      int protocol;
      int ret;
      int error;
}

message Socket_listen
{
   fields:
      int sockfd;
      int backlog;
      int error;
      int ret;
}

message Socket_bind
{
   fields:
      int sockfd;
      int ret;
      int error;
      bsd_sockaddr my_addr;
}

message Socket_connect
{
   fields:
      int sockfd;
      bsd_sockaddr serv_addr;
      int error;
      int ret;
}

message Socket_accept
{
  fields:
      int sockfd;
      bsd_sockaddr addr;
      int error;
      int ret;
}

message Socket_send
{

  fields:
      int sockfd;
      int len;
      int error;
      int ret;
}

message Socket_recv
{
  fields:
      int sockfd;
      int len;
      int error;
      int ret;
}

message Socket_close
{
  fields:
      int sockfd;
      int error;
      int ret;
}

message Socket_shutdown
{
  fields:
      int sockfd;
      int how;
      int error;
      int ret;
}


message Socket_select
{
  fields:
    int nfd;
    int readfds[];
    int writefds[];
    int exceptfds[];
    double timeout;
    int error;
    int ret;
}

message Socket_setsockopt
{
  fields:
    int sockfd;
    int level;
    int optname;
    // ptr val;
    int valsize;
    int ret;
    int error;

}