base/ipc/netrpc/rtnetP.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 1999-2003 Paolo Mantegazza <mantegazza@aero.polimi.it>
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License as
00006  * published by the Free Software Foundation; either version 2 of the
00007  * License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018 
00019 #ifndef __RTNET_RTNETP_H
00020 #define __RTNET_RTNETP_H
00021 
00022 int soft_rt_bind(int s,
00023          struct sockaddr *my_addr,
00024          int addrlen);
00025 
00026 int soft_rt_close(int s);
00027 
00028 int soft_rt_recvfrom(int s,
00029              void *buf,
00030              int len,
00031              unsigned int flags,
00032              struct sockaddr *from,
00033              long *fromlen);
00034 
00035 int soft_rt_sendto(int s,
00036            const void *buf,
00037            int len,
00038            unsigned int flags,
00039            struct sockaddr *to,
00040            int tolen);
00041 
00042 int soft_rt_socket(int domain,
00043            int type,
00044            int protocol);
00045 
00046 int soft_rt_socket_callback(int s,
00047                 int (*func)(int s, void *arg),
00048                 void *arg);
00049 
00050 struct sock_t { 
00051     int sock, opnd; 
00052     int tosend, recvd; 
00053     struct sockaddr addr; 
00054     int addrlen; 
00055     int (*callback)(int sock, void *arg); 
00056     void *arg; 
00057     char msg[MAX_MSG_SIZE]; 
00058 };
00059 
00060 #ifdef COMPILE_ANYHOW
00061 
00062 /* the hard RTNet external interface, used just to check netrpc compiles */
00063 
00064 struct rtdm_dev_context;
00065 
00066 struct rtnet_callback {
00067     void    (*func)(struct rtdm_dev_context *, void *);
00068     void    *arg;
00069 };
00070 
00071 #define RTIOC_TYPE_NETWORK    RTDM_CLASS_NETWORK
00072 
00073 #define RTNET_RTIOC_CALLBACK  _IOW(RTIOC_TYPE_NETWORK, 0x12, struct rtnet_callback)
00074 
00075 #endif /* COMPILE_ANYHOW */
00076 
00077 #endif /* !__RTNET_RTNETP_H */

Generated on Tue Feb 2 17:46:05 2010 for RTAI API by  doxygen 1.4.7