xref: /haiku/src/add-ons/kernel/file_systems/netfs/headers/shared/NetFSDefs.h (revision 5a1d355fdf2747f80f8c46e2539f844a0b813346)
1 // NetFSDefs.h
2 
3 #ifndef NET_FS_DEFS_H
4 #define NET_FS_DEFS_H
5 
6 #include <SupportDefs.h>
7 
8 extern const uint16 kDefaultInsecureConnectionPort;
9 extern const uint16 kDefaultBroadcastPort;
10 extern const uint16 kDefaultServerInfoPort;
11 
12 struct BroadcastMessage {
13 	uint32	magic;
14 	int32	protocolVersion;
15 	uint32	message;
16 };
17 
18 // version of the general NetFS protocol (the request stuff)
19 enum {
20 	NETFS_PROTOCOL_VERSION			= 1,
21 };
22 
23 // BroadcastMessage::magic value
24 enum {
25 	BROADCAST_MESSAGE_MAGIC			= 'BcMc',
26 };
27 
28 // BroadcastMessage::message values
29 enum {
30 	BROADCAST_MESSAGE_SERVER_TICK	= 0,	// periodical tick
31 	BROADCAST_MESSAGE_SERVER_UPDATE	= 1,	// shares have changed
32 	BROADCAST_MESSAGE_CLIENT_HELLO	= 2,	// client requests server tick
33 };
34 
35 extern const bigtime_t kBroadcastingInterval;
36 extern const bigtime_t kMinBroadcastingInterval;
37 
38 #endif	// NET_FS_DEFS_H
39