cascardo/rnetclient.git
10 years agoSend the 8-bit value address instead of its value.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:28:32 +0000 (08:28 -0300)]
Send the 8-bit value address instead of its value.

10 years agoAdd more fields to the first message.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:26:36 +0000 (08:26 -0300)]
Add more fields to the first message.

10 years agoAllow a single byte value to be added as a key/pair value.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:23:27 +0000 (08:23 -0300)]
Allow a single byte value to be added as a key/pair value.

10 years agoEncode some fields in the first protocol message.
Thadeu Lima de Souza Cascardo [Tue, 11 Jun 2013 22:06:25 +0000 (19:06 -0300)]
Encode some fields in the first protocol message.

Read some fields from the decfile and add those to a message built for
the ReceitaNet protocol.

10 years agoBuild rnet_message.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:14:55 +0000 (08:14 -0300)]
Build rnet_message.

10 years agoFix exercicio_pgd in protocol documentation.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:05:53 +0000 (08:05 -0300)]
Fix exercicio_pgd in protocol documentation.

Due to a bug in the parser used for reverse engineering, the field named
"exercicio" was appended to the field "exercicio_pgd".

10 years agoCreate rnet_message to encode messages.
Thadeu Lima de Souza Cascardo [Tue, 11 Jun 2013 21:21:50 +0000 (18:21 -0300)]
Create rnet_message to encode messages.

rnet_message allows us to encode messages in the form used for
ReceitaNet, which is a kind of set of key/values.

10 years agoParse DEC file header.
Thadeu Lima de Souza Cascardo [Tue, 11 Jun 2013 21:18:13 +0000 (18:18 -0300)]
Parse DEC file header.

Include fields from the header in a pmhash and introduce a function to
retrieve them. Some of those fields are needed to send the first message
to the server.

10 years agoIntroduce poor man's hash.
Thadeu Lima de Souza Cascardo [Tue, 11 Jun 2013 11:33:03 +0000 (08:33 -0300)]
Introduce poor man's hash.

This lookup array is helpful for adding fields parsed from the DEC file.

10 years agoRemove handshake success message
Thadeu Lima de Souza Cascardo [Tue, 11 Jun 2013 10:55:07 +0000 (07:55 -0300)]
Remove handshake success message

10 years agoStart parsing a DEC file.
Thadeu Lima de Souza Cascardo [Sat, 8 Jun 2013 12:40:21 +0000 (09:40 -0300)]
Start parsing a DEC file.

Read lines from a DEC file and store them in an array for later parsing.

10 years agoUpdate TODO
Thadeu Lima de Souza Cascardo [Sat, 8 Jun 2013 11:50:26 +0000 (08:50 -0300)]
Update TODO

10 years agoUpdate copyright years
Thadeu Lima de Souza Cascardo [Sat, 8 Jun 2013 11:50:18 +0000 (08:50 -0300)]
Update copyright years

10 years agoDocument server answer and next client message.
Thadeu Lima de Souza Cascardo [Fri, 7 Jun 2013 11:33:54 +0000 (08:33 -0300)]
Document server answer and next client message.

10 years agoComplete format documentation.
Thadeu Lima de Souza Cascardo [Tue, 28 May 2013 11:25:20 +0000 (08:25 -0300)]
Complete format documentation.

10 years agoDocument message header.
Thadeu Lima de Souza Cascardo [Tue, 28 May 2013 09:17:03 +0000 (06:17 -0300)]
Document message header.

10 years agoStart of documentation about the protocol.
Thadeu Lima de Souza Cascardo [Tue, 28 May 2013 09:15:46 +0000 (06:15 -0300)]
Start of documentation about the protocol.

10 years agoCreate a function for the first handshake.
Thadeu Lima de Souza Cascardo [Fri, 7 Jun 2013 22:04:15 +0000 (19:04 -0300)]
Create a function for the first handshake.

10 years agoUse getaddrinfo to obtain receitanet's addresses.
Thadeu Lima de Souza Cascardo [Fri, 7 Jun 2013 21:55:18 +0000 (18:55 -0300)]
Use getaddrinfo to obtain receitanet's addresses.

The name address for receitanet is receitanet.receita.fazenda.gov.br.
Instead of using its IPv4 address directly, tries to resolve the name
and use the given addresses.

As a bonus, allows us to use /etc/hosts to debug with a test server.

10 years agoIncrease buffer size for testing.
Thadeu Lima de Souza Cascardo [Tue, 28 May 2013 11:26:43 +0000 (08:26 -0300)]
Increase buffer size for testing.

For the current tests, the buffer needs to be increased, so the data
file can be read.

10 years agoUse the right IP address for receitanet server
Thadeu Lima de Souza Cascardo [Tue, 28 May 2013 11:26:32 +0000 (08:26 -0300)]
Use the right IP address for receitanet server

10 years agoVerify connect return code.
Thadeu Lima de Souza Cascardo [Tue, 28 May 2013 09:12:20 +0000 (06:12 -0300)]
Verify connect return code.

If connect is not successful, exit.

10 years agoFirst take at a client for ReceitaNet.
Thadeu Lima de Souza Cascardo [Tue, 28 May 2013 09:09:37 +0000 (06:09 -0300)]
First take at a client for ReceitaNet.