Skip to content

Commit

Permalink
multiple spelling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cgar committed Apr 16, 2014
1 parent 3835bc1 commit cf33c2f
Show file tree
Hide file tree
Showing 26 changed files with 62 additions and 61 deletions.
8 changes: 4 additions & 4 deletions docs/Group-Chats.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ See DHT, currently uses the IPv6 Node_format.
Get nodes (Request):
Packet contents:
```
[char with a value of 48][Bob's (The reciever's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][Random nonce (24 bytes)][Encrypted with the nonce, private key of the sender and public key of the reciever:[char with a value of 48][random 8 byte (ping_id)]
[char with a value of 48][Bob's (The receiver's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][Random nonce (24 bytes)][Encrypted with the nonce, private key of the sender and public key of the receiver:[char with a value of 48][random 8 byte (ping_id)]
```
Valid replies: a send_nodes packet

Send_nodes (response):
```
[char with a value of 48][Bob's (The reciever's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][Random nonce (24 bytes)][Encrypted with the nonce, private key of the sender and public key of the reciever:[char with a value of 49][random 8 byte (ping_id)][Nodes in node format, length=40 * (number of nodes (maximum of 6 nodes)) bytes]]
[char with a value of 48][Bob's (The receiver's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][Random nonce (24 bytes)][Encrypted with the nonce, private key of the sender and public key of the receiver:[char with a value of 49][random 8 byte (ping_id)][Nodes in node format, length=40 * (number of nodes (maximum of 6 nodes)) bytes]]
```

Broadcast packet:
```
[char with a value of 48][Bob's (The reciever's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][nonce][Encrypted with the nonce, private key of the sender and public key of the reciever:[char with a value of 50][Data to send to everyone]]
[char with a value of 48][Bob's (The receiver's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][nonce][Encrypted with the nonce, private key of the sender and public key of the receiver:[char with a value of 50][Data to send to everyone]]
```


Expand Down Expand Up @@ -68,4 +68,4 @@ Ban a peer
[uint8_t message[messagelen]]

65 - action (/me)
[uint8_t message[messagelen]]
[uint8_t message[messagelen]]
5 changes: 3 additions & 2 deletions docs/Prevent_Tracking.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ encrypted with that temporary private key and the nonce and the public key from
(if Node D contains the ret data for the node, it sends the stuff in this packet as a data to route response packet to the right node)

The data in the previous packet is in format: [real public key of sender]
encrypted with real private key of the sender, the nonce in the data packet and the real public key of the reciever:[[uint8_t id][data (optional)]]
encrypted with real private key of the sender, the nonce in the data packet and
the real public key of the receiver:[[uint8_t id][data (optional)]]

Data sent to us:
announce response packet:
Expand Down Expand Up @@ -153,5 +154,5 @@ Data packets:

To tell our friend what our DHT public key is so that he can connect to us we send a data packet
with id 156 and the data being:[uint64_t (in network byte order) no_replay, the packet will only be
accepted if this number is bigger than the last one recieved] [our dht public key][Node_Format * (
accepted if this number is bigger than the last one received] [our dht public key][Node_Format * (
maximum of 8) nodes closest to us so that the friend can find us faster]
4 changes: 2 additions & 2 deletions docs/TCP_Network.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ received
client sent the server the public key and the public key we sent to the client,
the next with base nonce + 1...)

The connection is set to an unconfirmed state until a packet is recieved and
The connection is set to an unconfirmed state until a packet is received and
decrypted correctly using the information in the handshake.

each packet sent to/from the server has an id (the first byte of the plain text
Expand Down Expand Up @@ -135,7 +135,7 @@ responses must be sent to the proper client.

Ping responses must have the same ping_id as the request.

If the server recieves a ping packet he must respond with a ping response.
If the server receives a ping packet he must respond with a ping response.

The server will send a ping packet to clients every 30 seconds, they have 30
seconds to respond, if they don't the connection is deleted.
Expand Down
2 changes: 1 addition & 1 deletion docs/av_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ msi_session_t* - pointer to a newly created msi session handler.
###msi_session_t reference:

How to handle msi session:
Controling is done via callbacks and action handlers.
Controlling is done via callbacks and action handlers.
First register callbacks for every state/action received and make sure
NOT TO PLACE SOMETHING LIKE LOOPS THAT TAKES A LOT OF TIME TO EXECUTE; every callback is being called
directly from event loop. You can find examples in phone.c.
Expand Down
2 changes: 1 addition & 1 deletion docs/updates/Crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ Crypto request packets

The encrypted message is encrypted with crypto_box() (using Bobs public key, Alice's private key and the nonce (randomly generated 24 bytes)) and is a message from Alice in which she tells Bob who she is.

Each node can route the request to the reciever if they are connected to him. This is to bypass bad NATs.
Each node can route the request to the receiver if they are connected to him. This is to bypass bad NATs.
2 changes: 1 addition & 1 deletion m4/pkg.m4
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fi[]dnl
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurence in configure.ac, so if the first place
# only at the first occurrence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion other/DHTnodes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
As maintaining 2 seperate lists of the same information seemed redundant, this list has been phased out.
As maintaining 2 separate lists of the same information seemed redundant, this list has been phased out.

For a current DHT node list please visit http://wiki.tox.im/nodes
2 changes: 1 addition & 1 deletion other/fun/cracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void print_key(uint8_t *client_id)
int main(int argc, char *argv[])
{
if (argc < 2) {
printf("usage: ./cracker public_key(or beggining of one in hex format)\n");
printf("usage: ./cracker public_key(or beginning of one in hex format)\n");
return 0;
}

Expand Down
24 changes: 12 additions & 12 deletions toxav/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static inline__ const uint8_t *stringify_response ( MSIResponse response )

#define ON_HEADER(iterator, header, descriptor, size_const) \
( memcmp(iterator, descriptor, size_const) == 0){ /* Okay */ \
iterator += size_const; /* Set iterator at begining of value part */ \
iterator += size_const; /* Set iterator at beginning of value part */ \
if ( *iterator != value_byte ) { assert(0); return -1; }\
iterator ++;\
uint16_t _value_size = (uint16_t) *(iterator ) << 8 | \
Expand All @@ -225,7 +225,7 @@ static inline__ const uint8_t *stringify_response ( MSIResponse response )
* @param msg Container.
* @param data The data.
* @return int
* @retval -1 Error occured.
* @retval -1 Error occurred.
* @retval 0 Success.
*/
int parse_raw_data ( MSIMessage *msg, const uint8_t *data, uint16_t length )
Expand Down Expand Up @@ -338,7 +338,7 @@ void free_message ( MSIMessage *msg )
* @param type Request or response.
* @param type_id Type of request/response.
* @return MSIMessage* Created message.
* @retval NULL Error occured.
* @retval NULL Error occurred.
*/
MSIMessage *msi_new_message ( uint8_t type, const uint8_t *type_id )
{
Expand Down Expand Up @@ -367,7 +367,7 @@ MSIMessage *msi_new_message ( uint8_t type, const uint8_t *type_id )
*
* @param data The data.
* @return MSIMessage* Parsed message.
* @retval NULL Error occured.
* @retval NULL Error occurred.
*/
MSIMessage *parse_message ( const uint8_t *data, uint16_t length )
{
Expand Down Expand Up @@ -422,7 +422,7 @@ uint8_t *append_header_to_string (

*dest = field_byte; /* Set the first byte */

uint8_t *_getback_byte = dest + 1; /* remeber the byte we were on */
uint8_t *_getback_byte = dest + 1; /* remember the byte we were on */
dest += 3; /* swith to 4th byte where field value starts */

/* Now set the field value and calculate it's length */
Expand Down Expand Up @@ -604,7 +604,7 @@ static inline__ const uint8_t *stringify_error_code ( MSICallError error_code )
* @param msg The message.
* @param to Where to.
* @return int
* @retval -1 Error occured.
* @retval -1 Error occurred.
* @retval 0 Success.
*/
int send_message ( MSISession *session, MSIMessage *msg, uint32_t to )
Expand Down Expand Up @@ -721,7 +721,7 @@ int handle_error ( MSISession *session, MSICallError errid, uint32_t to )
* @param msg The message.
* @return int
* @retval -1 No error.
* @retval 0 Error occured and response sent.
* @retval 0 Error occurred and response sent.
*/
int has_call_error ( MSISession *session, MSIMessage *msg )
{
Expand Down Expand Up @@ -830,7 +830,7 @@ MSICall *init_call ( MSISession *session, int peers, int ringing_timeout )
*
* @param session Control session.
* @return int
* @retval -1 Error occured.
* @retval -1 Error occurred.
* @retval 0 Success.
*/
int terminate_call ( MSISession *session )
Expand Down Expand Up @@ -882,7 +882,7 @@ int handle_recv_invite ( MSISession *session, MSIMessage *msg )
* B calls A. Who has advantage is set bey calculating
* 'bigger' Call id and then that call id is being used in
* future. User with 'bigger' Call id has the advantage
* as in he will wait the reponse from the other.
* as in he will wait the response from the other.
*/

if ( call_id_bigger (session->call->id, msg->callid.header_value) == 1 ) { /* Peer has advantage */
Expand Down Expand Up @@ -1250,7 +1250,7 @@ void msi_register_callback ( MSICallback callback, MSICallbackID id, void* userd
* @param messenger Tox* object.
* @param user_agent User agent, i.e. 'Venom'; 'QT-gui'
* @return MSISession* The created session.
* @retval NULL Error occured.
* @retval NULL Error occurred.
*/
MSISession *msi_init_session ( Messenger* messenger )
{
Expand Down Expand Up @@ -1351,7 +1351,7 @@ int msi_invite ( MSISession *session, MSICallType call_type, uint32_t rngsec, ui
*
* @param session Control session.
* @return int
* @retval -1 Error occured.
* @retval -1 Error occurred.
* @retval 0 Success.
*/
int msi_hangup ( MSISession *session )
Expand Down Expand Up @@ -1485,4 +1485,4 @@ int msi_stopcall ( MSISession *session )
terminate_call ( session );

return 0;
}
}
6 changes: 3 additions & 3 deletions toxav/msi.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ typedef struct _MSICall { /* Call info structure */
int ringing_timer_id; /* Timer id for ringing timeout */

pthread_mutex_t mutex; /* It's to be assumed that call will have
* seperate thread so add mutex
* separate thread so add mutex
*/
uint32_t *peers;
uint16_t peer_count;
Expand Down Expand Up @@ -152,7 +152,7 @@ void msi_register_callback(MSICallback callback, MSICallbackID id, void* userdat
*
* @param messenger Tox* object.
* @return MSISession* The created session.
* @retval NULL Error occured.
* @retval NULL Error occurred.
*/
MSISession *msi_init_session ( Messenger *messenger );

Expand Down Expand Up @@ -183,7 +183,7 @@ int msi_invite ( MSISession *session, MSICallType call_type, uint32_t rngsec, ui
*
* @param session Control session.
* @return int
* @retval -1 Error occured.
* @retval -1 Error occurred.
* @retval 0 Success.
*/
int msi_hangup ( MSISession *session );
Expand Down
4 changes: 2 additions & 2 deletions toxav/phone.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* This file is for testing/reference purposes only, hence
* it is _poorly_ designed and it does not fully reflect the
* quaility of msi nor rtp. Although toxmsi* and toxrtp* are tested
* there is always possiblity of crashes. If crash occures,
* there is always possibility of crashes. If crash occures,
* contact me ( mannol ) on either irc channel #tox-dev @ freenode.net:6667
* or eniz_vukovic@hotmail.com
*
Expand Down Expand Up @@ -612,7 +612,7 @@ void *decode_video_thread(void *arg)

} //else {

/* TODO: request the sender to create a new i-frame immediatly */
/* TODO: request the sender to create a new i-frame immediately */
//printf("Bad video packet\n");
//}
//}
Expand Down
18 changes: 9 additions & 9 deletions toxcore/DHT.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void get_shared_key(Shared_Keys *shared_keys, uint8_t *shared_key, uint8_t *secr
}

/* Copy shared_key to decrypt DHT packet from client_id into shared_key
* for packets that we recieve.
* for packets that we receive.
*/
void DHT_get_shared_key_recv(DHT *dht, uint8_t *shared_key, uint8_t *client_id)
{
Expand Down Expand Up @@ -600,7 +600,7 @@ static int replace_possible_bad( Client_data *list,

sort_list(list, length, comp_client_id);

/* TODO: decide if the folowing lines should stay commented or not.
/* TODO: decide if the following lines should stay commented or not.
if (id_closest(comp_client_id, list[0].client_id, client_id) == 1)
return 0;*/

Expand Down Expand Up @@ -861,20 +861,20 @@ static int getnodes(DHT *dht, IP_Port ip_port, uint8_t *public_key, uint8_t *cli

uint64_t temp_time = unix_time();
memcpy(plain_message, &temp_time, sizeof(temp_time));
Node_format reciever;
memcpy(reciever.client_id, public_key, CLIENT_ID_SIZE);
reciever.ip_port = ip_port;
memcpy(plain_message + sizeof(temp_time), &reciever, sizeof(reciever));
Node_format receiver;
memcpy(receiver.client_id, public_key, CLIENT_ID_SIZE);
receiver.ip_port = ip_port;
memcpy(plain_message + sizeof(temp_time), &receiver, sizeof(receiver));

if (sendback_node != NULL)
memcpy(plain_message + sizeof(temp_time) + sizeof(reciever), sendback_node, sizeof(Node_format));
memcpy(plain_message + sizeof(temp_time) + sizeof(receiver), sendback_node, sizeof(Node_format));
else
memset(plain_message + sizeof(temp_time) + sizeof(reciever), 0, sizeof(Node_format));
memset(plain_message + sizeof(temp_time) + sizeof(receiver), 0, sizeof(Node_format));

int len_m = encrypt_data_symmetric(dht->secret_symmetric_key,
nonce,
plain_message,
sizeof(temp_time) + sizeof(reciever) + sizeof(Node_format),
sizeof(temp_time) + sizeof(receiver) + sizeof(Node_format),
encrypted_message + crypto_secretbox_NONCEBYTES);

if (len_m != NODES_ENCRYPTED_MESSAGE_LENGTH - crypto_secretbox_NONCEBYTES)
Expand Down
2 changes: 1 addition & 1 deletion toxcore/DHT.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ typedef struct {
void get_shared_key(Shared_Keys *shared_keys, uint8_t *shared_key, uint8_t *secret_key, uint8_t *client_id);

/* Copy shared_key to decrypt DHT packet from client_id into shared_key
* for packets that we recieve.
* for packets that we receive.
*/
void DHT_get_shared_key_recv(DHT *dht, uint8_t *shared_key, uint8_t *client_id);

Expand Down
2 changes: 1 addition & 1 deletion toxcore/Lossless_UDP.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ static int new_inconnection(Lossless_UDP *ludp, IP_Port ip_port)
}

/*
* return an integer corresponding to the next connection in our incoming connection list with at least numpackets in the recieve queue.
* return an integer corresponding to the next connection in our incoming connection list with at least numpackets in the receive queue.
* return -1 if there are no new incoming connections in the list.
*/
int incoming_connection(Lossless_UDP *ludp, uint32_t numpackets)
Expand Down
2 changes: 1 addition & 1 deletion toxcore/Lossless_UDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ int new_connection(Lossless_UDP *ludp, IP_Port ip_port);
int getconnection_id(Lossless_UDP *ludp, IP_Port ip_port);

/*
* return an integer corresponding to the next connection in our incoming connection list with at least numpackets in the recieve queue.
* return an integer corresponding to the next connection in our incoming connection list with at least numpackets in the receive queue.
* return -1 if there are no new incoming connections in the list.
*/
int incoming_connection(Lossless_UDP *ludp, uint32_t numpackets);
Expand Down
2 changes: 1 addition & 1 deletion toxcore/Messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2172,7 +2172,7 @@ void do_friends(Messenger *m)
}

if (m->friendlist[i].ping_lastrecv + FRIEND_CONNECTION_TIMEOUT < temp_time) {
/* If we stopped recieving ping packets, kill it. */
/* If we stopped receiving ping packets, kill it. */
crypto_kill(m->net_crypto, m->friendlist[i].crypt_connection_id);
m->friendlist[i].crypt_connection_id = -1;
set_friend_status(m, i, FRIEND_CONFIRMED);
Expand Down
4 changes: 2 additions & 2 deletions toxcore/Messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ enum {
/* Interval between the sending of ping packets. */
#define FRIEND_PING_INTERVAL 5

/* If no packets are recieved from friend in this time interval, kill the connection. */
/* If no packets are received from friend in this time interval, kill the connection. */
#define FRIEND_CONNECTION_TIMEOUT (FRIEND_PING_INTERVAL * 2)

/* USERSTATUS -
Expand Down Expand Up @@ -354,7 +354,7 @@ int setname(Messenger *m, uint8_t *name, uint16_t length);

/*
* Get your nickname.
* m - The messanger context to use.
* m - The messenger context to use.
* name needs to be a valid memory location with a size of at least MAX_NAME_LENGTH bytes.
*
* return length of the name.
Expand Down
2 changes: 1 addition & 1 deletion toxcore/TCP_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ int read_TCP_packet(sock_t sock, uint8_t *data, uint16_t length)
return -1;
}

/* return length of recieved packet on success.
/* return length of received packet on success.
* return 0 if could not read any packet.
* return -1 on failure (connection must be killed).
*/
Expand Down
2 changes: 1 addition & 1 deletion toxcore/TCP_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ uint16_t read_TCP_length(sock_t sock);
*/
int read_TCP_packet(sock_t sock, uint8_t *data, uint16_t length);

/* return length of recieved packet on success.
/* return length of received packet on success.
* return 0 if could not read any packet.
* return -1 on failure (connection must be killed).
*/
Expand Down
2 changes: 1 addition & 1 deletion toxcore/assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Candidates are kept in buckets of hash tables. The hash
* function is calculated from the client_id. Up to
* HASH_COLLIDE_COUNT alternative positions are tried if
* the inital position is already used by a different entry.
* the initial position is already used by a different entry.
* The collision function is multiplicative, not additive.
*
* A new candidate can bump an existing candidate, if it is
Expand Down
2 changes: 1 addition & 1 deletion toxcore/net_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ int write_cryptpacket(Net_Crypto *c, int crypt_connection_id, uint8_t *data, uin

/* Create a request to peer.
* send_public_key and send_secret_key are the pub/secret keys of the sender.
* recv_public_key is public key of reciever.
* recv_public_key is public key of receiver.
* packet must be an array of MAX_DATA_SIZE big.
* Data represents the data we send with the request with length being the length of the data.
* request_id is the id of the request (32 = friend request, 254 = ping request).
Expand Down
2 changes: 1 addition & 1 deletion toxcore/net_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ int write_cryptpacket(Net_Crypto *c, int crypt_connection_id, uint8_t *data, uin

/* Create a request to peer.
* send_public_key and send_secret_key are the pub/secret keys of the sender.
* recv_public_key is public key of reciever.
* recv_public_key is public key of receiver.
* packet must be an array of MAX_DATA_SIZE big.
* Data represents the data we send with the request with length being the length of the data.
* request_id is the id of the request (32 = friend request, 254 = ping request).
Expand Down

0 comments on commit cf33c2f

Please sign in to comment.