Added lots of asserts, and split out the ip address from the connection object.

Still a lot of work remains and a massive network connection cleanup is needed.
This commit is contained in:
Jan Vidar Krey
2009-09-28 23:15:15 +02:00
parent a53c219f05
commit 69f6d811bf
11 changed files with 54 additions and 32 deletions

View File

@@ -79,6 +79,7 @@ struct hub_user_info
sid_t sid; /** session ID */
char cid[MAX_CID_LEN+1]; /** global client ID */
char nick[MAX_NICK_LEN+1]; /** User's nick name */
struct ip_addr_encap addr; /** User's IP address */
};
/**
@@ -209,6 +210,8 @@ extern void user_support_add(struct hub_user* user, int fourcc);
*/
extern void user_support_remove(struct hub_user* user, int fourcc);
extern const char* user_get_address(struct hub_user* user);
/**
* Sets the nat override flag for a user, this allows users on the same
* subnet as a natted hub to spoof their IP in order to use active mode