Dir "SBin" {
- File "init" "../../../Usermode/Applications/init"
- File "login" "../../../Usermode/Applications/login"
+ File "init" "../../../Usermode/Output/i386/SBin/init"
+ File "login" "../../../Usermode/Output/i386/SBin/login"
}
Dir "Bin" {
- File "CLIShell" "../../../Usermode/Applications/CLIShell"
- File "ls" "../../../Usermode/Applications/ls"
- File "cat" "../../../Usermode/Applications/cat"
- File "mount" "../../../Usermode/Applications/mount"
- File "pcidump" "../../../Usermode/Applications/pcidump"
+ File "CLIShell" "../../../Usermode/Output/i386/Bin/CLIShell"
+ File "ls" "../../../Usermode/Output/i386/Bin/ls"
+ File "cat" "../../../Usermode/Output/i386/Bin/cat"
+ File "mount" "../../../Usermode/Output/i386/Bin/mount"
+ File "pcidump" "../../../Usermode/Output/i386/Bin/pcidump"
+ File "ifconfig" "../../../Usermode/Output/i386/Bin/ifconfig"
}
Dir "Libs" {
- File "ld-acess.so" "../../../Usermode/Libraries/ld-acess.so"
- File "libacess.so" "../../../Usermode/Libraries/libacess.so"
- File "libc.so" "../../../Usermode/Libraries/libc.so"
- File "libgcc.so" "../../../Usermode/Libraries/libgcc.so"
- File "libreadline.so" "../../../Usermode/Libraries/libreadline.so"
+ File "ld-acess.so" "../../../Usermode/Output/i386/Libs/ld-acess.so"
+ File "libc.so" "../../../Usermode/Output/i386/Libs/libc.so"
+ File "libgcc.so" "../../../Usermode/Output/i386/Libs/libgcc.so"
+ File "libreadline.so" "../../../Usermode/Output/i386/Libs/libreadline.so"
+ File "libreadline.so" "../../../Usermode/Output/i386/Libs/libnet.so"
}
Dir "Conf" {
File "BootConf.cfg" "../../../Usermode/Filesystem/Conf/BootConf.cfg"
// === PROTOTYPES ===
int InitRD_Install(char **Arguments);
-tVFS_Node *InitRD_InitDevice(char *Device, char **Arguments);
+tVFS_Node *InitRD_InitDevice(const char *Device, const char **Arguments);
void InitRD_Unmount(tVFS_Node *Node);
Uint64 InitRD_ReadFile(tVFS_Node *Node, Uint64 Offset, Uint64 Size, void *Buffer);
char *InitRD_ReadDir(tVFS_Node *Node, int ID);
/**
* \brief Mount the InitRD
*/
-tVFS_Node *InitRD_InitDevice(char *Device, char **Arguments)
+tVFS_Node *InitRD_InitDevice(const char *Device, const char **Arguments)
{
#if DUMP_ON_MOUNT
InitRD_DumpDir( &gInitRD_RootNode, 0 );
tTCPStoredPacket *pkt;
int dataLen;
+ // Syncronise sequence values
if(Header->Flags & TCP_FLAG_SYN) {
Connection->NextSequenceRcv = ntohl(Header->SequenceNumber) + 1;
}
+ // Handle a server replying to our initial SYN
if( Connection->State == TCP_ST_SYN_SENT )
{
- if( (Header->Flags & (TCP_FLAG_SYN|TCP_FLAG_ACK)) == (TCP_FLAG_SYN|TCP_FLAG_ACK) ) {
-
+ if( (Header->Flags & (TCP_FLAG_SYN|TCP_FLAG_ACK)) == (TCP_FLAG_SYN|TCP_FLAG_ACK) )
+ {
Header->DestPort = Header->SourcePort;
Header->SourcePort = htons(Connection->LocalPort);
Header->AcknowlegementNumber = htonl(Connection->NextSequenceRcv);
}
}
+ // Handle a client confirming the connection
+ if( Connection->State == TCP_ST_HALFOPEN && (Header->Flags & TCP_FLAG_ACK) )
+ {
+ Connection->State = TCP_ST_OPEN;
+ Log_Log("TCP", "Connection fully opened");
+ }
+
// Get length of data
dataLen = Length - (Header->DataOffset>>4)*4;
Log_Log("TCP", "HandleConnectionPacket - dataLen = %i", dataLen);
}
}
+ // Check for an empty packet
if(dataLen == 0) {
Log_Log("TCP", "Empty Packet");
return ;
ENTER("pNode iID pData", Node, ID, Data);
switch( ID )
{
- case DRV_IOCTL_TYPE:
- LEAVE('i', DRV_TYPE_NETWORK);
- return DRV_TYPE_NETWORK;
-
- case DRV_IOCTL_IDENT:
- tmp = ModUtil_SetIdent(Data, "Ne2k");
- LEAVE('i', tmp);
- return tmp;
-
- case DRV_IOCTL_VERSION:
- LEAVE('x', VERSION);
- return VERSION;
-
- case DRV_IOCTL_LOOKUP:
- tmp = ModUtil_LookupString( (char**)casIOCtls, Data );
- LEAVE('i', tmp);
- return tmp;
+ BASE_IOCTLS(DRV_TYPE_NETWORK, "NE2000", VERSION, casIOCtls);
}
// If this is the root, return
ENTER("pNode XOffset XLength pBuffer", Node, Offset, Length, Buffer);
+ // TODO: Use MutexP/MutexV instead
while(Card->NumWaitingPackets == 0) Threads_Yield();
// Make sure that the card is in page 0
int con = -1;
int len;
uint16_t port;
- uint8_t buf[4] = {10,0,2,1};
+ uint8_t buf[4] = {10,2,0,37};
uint8_t data[4096]; // Packet Data
con = open("/Devices/ip/1/tcpc", OPENFLAG_READ|OPENFLAG_WRITE);
ioctl(con, 7, NULL); // Connect
#define REQ_STR "GET / HTTP/1.1\r\n"\
- "Host: prelude\r\n"\
+ "Host: sonata\r\n"\
"User-Agent: Acess2 TCP Test Client\r\n"\
"\r\n"