From: <ljs...@us...> - 2007-05-25 01:10:16
|
Revision: 405 http://svn.sourceforge.net/cadcdev/?rev=405&view=rev Author: ljsebald Date: 2007-05-24 18:10:09 -0700 (Thu, 24 May 2007) Log Message: ----------- Got rid of net_ntohl and net_ntohs, considering ntohl and ntohs have been in here for a while. Modified Paths: -------------- kos/kernel/net/net_ipv4.c kos/kernel/net/net_ipv4.h Modified: kos/kernel/net/net_ipv4.c =================================================================== --- kos/kernel/net/net_ipv4.c 2007-05-25 01:06:52 UTC (rev 404) +++ kos/kernel/net/net_ipv4.c 2007-05-25 01:10:09 UTC (rev 405) @@ -18,15 +18,6 @@ #include "net_icmp.h" #include "net_udp.h" -uint16 net_ntohs(uint16 n) { - return ((n & 0xff) << 8) | ((n >> 8) & 0xff); -} - -uint32 net_ntohl(uint32 n) { - return ((n & 0xFF) << 24) | ((n & 0xFF00) << 8) | - ((n >> 8) & 0xFF00) | ((n >> 24) & 0xFF); -} - /* Perform an IP-style checksum on a block of data */ uint16 net_ipv4_checksum(const uint16 *data, int words) { uint32 sum; Modified: kos/kernel/net/net_ipv4.h =================================================================== --- kos/kernel/net/net_ipv4.h 2007-05-25 01:06:52 UTC (rev 404) +++ kos/kernel/net/net_ipv4.h 2007-05-25 01:10:09 UTC (rev 405) @@ -47,7 +47,4 @@ int net_ipv4_send_packet(netif_t *net, ip_hdr_t *hdr, const uint8 *data, int size); int net_ipv4_input(netif_t *src, const uint8 *pkt, int pktsize); -uint16 net_ntohs(uint16 n); -uint32 net_ntohl(uint32 n); - #endif /* __LOCAL_NET_IPV4_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |