Changeset 2086 for Whitix

Show
Ignore:
Timestamp:
05/22/10 22:22:21 (2 years ago)
Author:
mwhitworth
Message:

Add to network stack.

Location:
Whitix/branches/netchannel/user/sdk/network
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/netchannel/user/sdk/network/dns.c

    r2084 r2086  
    261261        struct Ipv4EndPoint dnsAddr; 
    262262 
     263        /* Don't need to contact any DNS servers for these well-known names */ 
     264        if (!strcmp(name, "localhost")) 
     265        { 
     266                *address = 0x7F000001; 
     267                return 0; 
     268        } 
     269 
    263270        /* FIXME */ 
    264271        dnsAddr.address = 0xC0A801FE; 
  • Whitix/branches/netchannel/user/sdk/network/socket.c

    r2085 r2086  
    112112        return -1; 
    113113} 
     114 
     115int SocketSetFlags(Socket* socket, int flags) 
     116{ 
     117        socket->flags |= flags; 
     118        return 0; 
     119} 
     120 
     121int SocketFd(Socket* socket) 
     122{ 
     123        return socket->channel->fd; 
     124} 
  • Whitix/branches/netchannel/user/sdk/network/tcp_buffer.h

    r2084 r2086  
    2121} 
    2222 
    23 static inline ChanRecvBuffer* TcpBufferNext(Channel* channel, ChanRecvBuffer* buffer) 
     23static inline ChanRecvBuffer* TcpRecvBufferNext(Channel* channel, ChanRecvBuffer* buffer) 
    2424{ 
    2525        return ChanRecvBuffGetPriv(buffer); 
     26} 
     27 
     28static inline ChanSendBuffer* TcpSendBufferNext(Channel* channel, ChanSendBuffer* buffer) 
     29{ 
     30        return ChanSendBuffGetPriv(buffer); 
    2631} 
    2732