git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More work on UDI, Added more Login VTerms
[tpg/acess2.git]
/
Modules
/
IPStack
/
ipstack.h
diff --git
a/Modules/IPStack/ipstack.h
b/Modules/IPStack/ipstack.h
index
8b846ab
..
94fabbb
100644
(file)
--- a/
Modules/IPStack/ipstack.h
+++ b/
Modules/IPStack/ipstack.h
@@
-5,7
+5,7
@@
#ifndef _IPSTACK_H_
#define _IPSTACK_H_
#ifndef _IPSTACK_H_
#define _IPSTACK_H_
-#include <
common
.h>
+#include <
acess
.h>
#include <vfs.h>
typedef union uIPv4 tIPv4;
#include <vfs.h>
typedef union uIPv4 tIPv4;
@@
-19,26
+19,26
@@
typedef void (*tIPCallback)(tInterface *Interface, void *Address, int Length, vo
union uIPv4 {
Uint32 L;
Uint8 B[4];
union uIPv4 {
Uint32 L;
Uint8 B[4];
-};
+}
__attribute__((packed))
;
union uIPv6 {
Uint32 L[4];
Uint8 B[16];
union uIPv6 {
Uint32 L[4];
Uint8 B[16];
-};
+}
__attribute__((packed))
;
struct sMacAddr {
Uint8 B[6];
struct sMacAddr {
Uint8 B[6];
-};
+}
__attribute__((packed))
;
struct sInterface {
struct sInterface *Next;
tVFS_Node Node;
tAdapter *Adapter;
struct sInterface {
struct sInterface *Next;
tVFS_Node Node;
tAdapter *Adapter;
- int Type; // 4 for IPv4 and 6 for IPv6
+ int Type; //
0 for disabled,
4 for IPv4 and 6 for IPv6
union {
struct {
tIPv6 Address;
union {
struct {
tIPv6 Address;
- int SubnetBits;
+ int SubnetBits;
//Should this be outside the union?
} IP6;
struct {
} IP6;
struct {
@@
-54,12
+54,12
@@
struct sInterface {
*/
struct sAdapter {
struct sAdapter *Next;
*/
struct sAdapter {
struct sAdapter *Next;
- char *Device;
+
int DeviceFD;
int DeviceFD;
+ int NRef;
tMacAddr MacAddr;
tMacAddr MacAddr;
-
- tInterface *Interfaces;
+ char Device[];
};
static const tMacAddr cMAC_BROADCAST = {{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}};
};
static const tMacAddr cMAC_BROADCAST = {{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}};
@@
-78,6
+78,6
@@
static const tMacAddr cMAC_BROADCAST = {{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}};
#define htonl(in) BigEndian32(in)
#define ntonb(v) (v)
#define ntohs(in) BigEndian16(in)
#define htonl(in) BigEndian32(in)
#define ntonb(v) (v)
#define ntohs(in) BigEndian16(in)
-#define ntohl(in) BigEndian
16
(in)
+#define ntohl(in) BigEndian
32
(in)
#endif
#endif
UCC
git Repository :: git.ucc.asn.au