#include "member.h"Include dependency graph for member.c:

Go to the source code of this file.
Functions | |
| SGLIB_DEFINE_RBTREE_FUNCTIONS (Member, left, right, color, MEMBER_COMPARATOR) | |
| Member * | Member_find (Member *map, bstring pubkey) |
| Message * | Member_first_msg (Member *member) |
| int | Member_delete_msg (Member *member) |
| Member * | Member_for_circuit (Member *member, long circuit) |
| int | Member_send_msg (Member *member, Message *msg) |
| Member * | Member_create (Peer *peer) |
| Creates a new member not in the map yet. | |
| Member * | Member_login (Member **map, Peer *peer) |
| void | Member_logout (Member **map, Member *member) |
| void | Member_destroy (Member *mb) |
| void | Member_destroy_map (Member **map) |
Creates a new member not in the map yet.
| peer | : The peer structure for this member's connection. |
Definition at line 78 of file member.c.
References assert_mem, assert_not, CRYPT_THEIR_KEY, CryptState_export_key(), Heap_create(), Member::key, MEMBER_MSG_QUEUE_LENGTH, MsgQueue_create(), Member::peer, Member::queue, Member::routes, and Peer::state.
Referenced by Member_login().
Here is the call graph for this function:

| int Member_delete_msg | ( | Member * | member | ) |
Remove the message from the Member's queue front and return 0 if there are no more, 1 if there are.
| member | The member with the queue of interest. |
Definition at line 42 of file member.c.
References assert_not, MsgQueue_delete(), and Member::queue.
Referenced by ConnectionState_exec().
Here is the call graph for this function:

| void Member_destroy | ( | Member * | mb | ) |
Called primarily by Member_logout or other error conditions, this removes cleans up the Member's stuff clearing out all the pending messages as well.
| mb | Member to destroy. |
Definition at line 132 of file member.c.
References bdestroy(), Circuit_destroy_all(), Member::circuits, Heap_destroy(), Member::key, MsgQueue_destroy(), Member::queue, and Member::routes.
Referenced by Member_destroy_map(), Member_login(), and Member_logout().
Here is the call graph for this function:

| void Member_destroy_map | ( | Member ** | map | ) |
Destroys an entire Member map by going through each one and calling Member_destroy().
It sets the member map to NULL when it's done.
| map | IN/OUT The map to destroy. |
Definition at line 141 of file member.c.
References assert_not, and Member_destroy().
Here is the call graph for this function:

Finds the Member in the map who has the given pubkey.
| map | Main member map to search in. | |
| pubkey | The key to search for. |
Definition at line 21 of file member.c.
References assert_not, and Member::key.
Get the reference to the next message for this Member. It will block the requesting task until there is a message ready to process. If this returns NULL then it means that the waiting task was woken up during a shutdown or delete, and should not use the member further.
| member | The member with the queue of interest. |
Definition at line 35 of file member.c.
References assert_not, MsgQueue_first(), and Member::queue.
Referenced by ConnectionState_dequeue_msg().
Here is the call graph for this function:

Given a circuit ID it finds the "to" member in this member's circuit list and returns it, otherwise it returns NULL.
| member | The member the circuit belongs to. | |
| circuit | The CID to search for. |
Definition at line 49 of file member.c.
References Member::circuits, and Circuit::to.
Referenced by ConnectionState_exec().
Add a member to the map based on their established Utu key, but don't let them login more than once.
| map | The member map to add this new member to. | |
| peer | The peer layer they are riding on. |
Definition at line 94 of file member.c.
References check, Member_create(), Member_destroy(), and on_fail.
Referenced by ConnectionState_exec().
Here is the call graph for this function:

Removes the given member from the map, letting the GC clean them up when ready.
| map | The member map. | |
| member | The member to remove from the structure. |
Definition at line 110 of file member.c.
References assert_not, Member_destroy(), MsgQueue_mark_dead, MsgQueue_wake_all, and Member::queue.
Referenced by ConnectionState_half_close().
Here is the call graph for this function:

Send a message to the member, putting it on their queue.
| member | Who to send it to. | |
| msg | The message to send. |
Definition at line 62 of file member.c.
References assert_not, check, MsgQueue_add(), MsgQueue_is_full, MsgQueue_wake_all, on_fail, and Member::queue.
Referenced by ConnectionState_exec(), Hub_broadcast(), and Route_deliver().
Here is the call graph for this function:

| SGLIB_DEFINE_RBTREE_FUNCTIONS | ( | Member | , | |
| left | , | |||
| right | , | |||
| color | , | |||
| MEMBER_COMPARATOR | ||||
| ) |
1.5.1