1// NetFSDefs.h 2 3#ifndef NET_FS_DEFS_H 4#define NET_FS_DEFS_H 5 6#include <SupportDefs.h> 7 8extern const uint16 kDefaultInsecureConnectionPort; 9extern const uint16 kDefaultBroadcastPort; 10extern const uint16 kDefaultServerInfoPort; 11 12struct BroadcastMessage { 13 uint32 magic; 14 int32 protocolVersion; 15 uint32 message; 16}; 17 18// version of the general NetFS protocol (the request stuff) 19enum { 20 NETFS_PROTOCOL_VERSION = 1, 21}; 22 23// BroadcastMessage::magic value 24enum { 25 BROADCAST_MESSAGE_MAGIC = 'BcMc', 26}; 27 28// BroadcastMessage::message values 29enum { 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 35extern const bigtime_t kBroadcastingInterval; 36extern const bigtime_t kMinBroadcastingInterval; 37 38#endif // NET_FS_DEFS_H 39