00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __NET_H
00025 #define __NET_H
00026
00027
00028 #include "types.h"
00029 #include "Tag.h"
00030 #include "port/Glw.h"
00031
00032
00033 struct net_Files;
00034
00035
00036
00037 #define TAG_NET_CONN (TAG_USER+100)
00038 #define TAG_NET_FILELIST (TAG_USER+101)
00039 #define TAG_NET_LEN (TAG_USER+102)
00040 #define TAG_NET_NAMES (TAG_USER+103)
00041 #define TAG_NET_NAME ((TAG_USER+104)|TAGT_STRING)
00042
00043
00044
00045
00046 u32 net_FilelistGetNext(u32 firsttag, ...);
00047 u32 net_FilelistGetNextTL(tag *taglist);
00048 u32 net_FilelistFree(u32 firsttag, ...);
00049 u32 net_FilelistFreeTL(tag *taglist);
00050 u32 net_FilelistLoad(u32 firsttag, ...);
00051 u32 net_FilelistLoadTL(tag *taglist);
00052 u32 net_LoadFile(u32 firsttag, ...);
00053 u32 net_LoadFileTL(tag *taglist);
00054
00055
00056
00057
00058 enum net_functions
00059 {
00060 NET_FILELISTGETNEXT=NET_FUNCBASE,
00061 NET_FILELISTFREE,
00062 NET_FILELISTLOAD,
00063 NET_LOADFILE,
00064 NET_FUNC_DONE
00065 };
00066
00067
00068
00069 u32 net_Call(int function, u32 firsttag, ...);
00070 u32 net_CallTL(int function, tag *taglist);
00071
00072
00073
00074
00075 int net_Init(void);
00076 void net_CleanUp(void);
00077 int net_GetPort(void);
00078 int net_Server(u32 conn);
00079 int net_Client(u32 conn);
00080 char *net_CheckClient(u32 conn, int *byteorder);
00081 int net_SerProcessMessage(u32 conn, u32 userdata, struct glw_SockMsg *msg);
00082 void net_SerSendApp(u32 conn);
00083
00084
00085 #endif