Some net headers fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1911 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin
2002-11-13 07:57:19 +00:00
parent 7eae9afc01
commit 40e492bc4c
4 changed files with 49 additions and 59 deletions
+7 -9
View File
@@ -42,11 +42,11 @@ class BNetBuffer : public BArchivable
{ {
public: public:
BNetBuffer(size_t size = 0); BNetBuffer(size_t size = 0);
virtual ~BNetBuffer( void ); virtual ~BNetBuffer();
status_t InitCheck( void ); status_t InitCheck();
BNetBuffer( BMessage* Archive ); BNetBuffer(BMessage *archive);
virtual status_t Archive(BMessage *into, bool deep = true) const; virtual status_t Archive(BMessage *into, bool deep = true) const;
static BArchivable *Instantiate(BMessage *archive); static BArchivable *Instantiate(BMessage *archive);
@@ -83,11 +83,11 @@ public:
status_t RemoveUint64(uint64 &); status_t RemoveUint64(uint64 &);
// Accessors. // Accessors.
unsigned char* Data( void ) const; unsigned char *Data() const;
size_t Size( void ) const; size_t Size() const;
size_t BytesRemaining( void ) const; size_t BytesRemaining() const;
inline NLPacket *GetImpl( void ) const; inline NLPacket *GetImpl() const;
protected: protected:
// Attributes. // Attributes.
@@ -117,5 +117,3 @@ inline NLPacket* BNetBuffer::GetImpl( void ) const
#endif // <-- #ifndef _NETBUFFER_H #endif // <-- #ifndef _NETBUFFER_H
/*=------------------------------------------------------------------- End -=*/
-2
View File
@@ -54,5 +54,3 @@ public:
#endif // <-- #ifndef _NETDEBUG_H #endif // <-- #ifndef _NETDEBUG_H
/*=------------------------------------------------------------------- End -=*/
-15
View File
@@ -15,19 +15,7 @@
#include "net/if.h" #include "net/if.h"
#include "net/route.h" #include "net/route.h"
#ifdef _KERNEL_MODE
#include <module.h> #include <module.h>
#else
typedef struct module_info {
const char *name;
uint32 flags;
status_t (*std_ops)(int32, ...);
} module_info;
#define B_MODULE_INIT 1
#define B_MODULE_UNINIT 2
#define B_KEEP_LOADED 0x00000001
#endif
struct kernel_net_module_info { struct kernel_net_module_info {
module_info info; module_info info;
@@ -39,9 +27,6 @@ struct net_module {
struct net_module *next; struct net_module *next;
char *name; char *name;
struct kernel_net_module_info *ptr; struct kernel_net_module_info *ptr;
#ifndef _KERNEL_MODE
image_id iid;
#endif
int status; int status;
}; };
+9
View File
@@ -11,6 +11,9 @@
#include <OS.h> #include <OS.h>
#include "net_stack_driver.h" #include "net_stack_driver.h"
#ifdef __cplusplus
extern "C" {
#endif
#define NET_STACK_PORTNAME "net_server connection" #define NET_STACK_PORTNAME "net_server connection"
@@ -47,7 +50,13 @@ typedef struct {
uint32 numCommands,bufferSize; uint32 numCommands,bufferSize;
} net_connection; } net_connection;
extern status_t init_userland_ipc(void); extern status_t init_userland_ipc(void);
extern void shutdown_userland_ipc(void); extern void shutdown_userland_ipc(void);
#ifdef __cplusplus
} // end of extern "C"
#endif
#endif /* USERLAND_IPC_H */ #endif /* USERLAND_IPC_H */