Thadeu Lima de Souza Cascardo [Fri, 18 Mar 2016 10:42:41 +0000 (07:42 -0300)]
Release 2016.1
Gabriel F. T. Gomes [Sun, 13 Mar 2016 19:34:54 +0000 (16:34 -0300)]
Test parsing of header and encoding
This test opens DEC files from the years supported by rnetclient, parse their
headers and encode the data for transmission. The DEC files contain only
fictitious information.
Thadeu Lima de Souza Cascardo [Fri, 18 Mar 2016 13:22:18 +0000 (10:22 -0300)]
Exit before transmission if receipt file cannot be created.
If opening the receipt file fails after transmission, it's too late to
tell the user about the failure.
Reviewed-by: Gabriel F. T. Gomes <gabriel@gftg.com.br>
Thadeu Lima de Souza Cascardo [Fri, 18 Mar 2016 13:22:17 +0000 (10:22 -0300)]
Verify output dir before transmission.
In case the output dir is not valid, we should exit before transmitting
the file. It's too late to realize the directory is not valid when the
receipt is ready to be saved.
Reviewed-by: Gabriel F. T. Gomes <gabriel@gftg.com.br>
Thadeu Lima de Souza Cascardo [Fri, 18 Mar 2016 13:22:16 +0000 (10:22 -0300)]
Improve exit status for rnetclient.
When error happens, exit earlier and do proper cleanup, exiting with an
error.
Reviewed-by: Gabriel F. T. Gomes <gabriel@gftg.com.br>
Gabriel F. T. Gomes [Sun, 13 Mar 2016 22:16:47 +0000 (19:16 -0300)]
Support header for 2016.
As usual, fields have been added to the file header. Parsing has been
tested, but not transmitting.
Gabriel F. T. Gomes [Sun, 13 Mar 2016 22:16:22 +0000 (19:16 -0300)]
Parse the header in a single function
The header of the declaration files is composed of several fields. Each year
this header changes, however most of the fields are the same throughout the
years supported by rnetclient. This patch refactors the code so that the
parsing of the headers fields is done in a single function.
Changes since v1:
* Merge decfile_parse_header and parse_header_common into the former.
* Undeleted some assertions:
- (p - buffer != RNET_HEADER_HEAD_COMMON)
- (p - tail != RNET_HEADER_TAIL_COMMON)
* Changed some comments regarding fields orlder than 2013.
* Assert exerc is a valid year and sooner.
* Moved last checks out of the else statement.
Thadeu Lima de Souza Cascardo [Mon, 7 Mar 2016 00:50:15 +0000 (21:50 -0300)]
Parse common part of header and accept other years.
This patch allows files from other years to be transmited, but won't be
able to read all the data from the header, and won't be able to do extra
verification.
The only real verifications done is that the header size matches what is
expected for that year and there is a high level of confidence that the
head part of the header is really the same for the years supported by
rnetclient.
No other verification is done for the extra fields present in the file,
and all the extra data is not used any other place in the program
anyway.
Thadeu Lima de Souza Cascardo [Tue, 3 Mar 2015 12:59:57 +0000 (09:59 -0300)]
Release 2015.1
Thadeu Lima de Souza Cascardo [Tue, 3 Mar 2015 09:57:22 +0000 (06:57 -0300)]
When encoding message, accept 2015.
Thadeu Lima de Souza Cascardo [Tue, 3 Mar 2015 12:56:34 +0000 (09:56 -0300)]
Verify return code from rnet_encode.
If a given file header is not currently supported or has other problems
that we did not detect during first parsing, the user should be warned
and the program bail out.
Thadeu Lima de Souza Cascardo [Tue, 3 Mar 2015 12:56:15 +0000 (09:56 -0300)]
Release memory when returning error during rnet_encode.
Thadeu Lima de Souza Cascardo [Mon, 2 Mar 2015 19:39:48 +0000 (16:39 -0300)]
Do a beta release for 2015 support.
Thadeu Lima de Souza Cascardo [Mon, 2 Mar 2015 19:38:09 +0000 (16:38 -0300)]
Support header for 2015.
As usual, fields have been added to the file header. Parsing has been
tested, but not transmitting.
Sergio Durigan Junior [Sun, 22 Feb 2015 07:03:54 +0000 (02:03 -0500)]
Release v.2014.2.
Sergio Durigan Junior [Mon, 12 May 2014 06:13:42 +0000 (03:13 -0300)]
Fixing copyright headers
I made a mistake in the last commit and used my work e-mail address in
the Copyright header of some files. Fixing that.
Sergio Durigan Junior [Mon, 12 May 2014 06:08:38 +0000 (03:08 -0300)]
Create manpages for the project
This commit creates the manpages for the project. There are two
versions implemented here: the en_US, and the pt_BR. Along with the
manpages, I am also modifying and creating Makefile.am files needed to
properly handle/install the manpages.
It is worth making some notes here:
- We have to keep an eye in order to sync the manpages every time one of
them is modified.
- We also have to be careful to update the manpages every time a new
option is added to the program.
Sergio Durigan Junior [Tue, 29 Apr 2014 00:11:19 +0000 (21:11 -0300)]
Fix bug when saving the receipt file using a .DEC filename as template
This commit fixes a bug that happens when the user provides a .DEC
filename to be transmitted, and rnetclient uses this filename to compose
the receipt (.REC) filename to be saved. I forgot to use "basename" to
extract only the .DEC filename (and strip all the other paths) before using
it to build the .REC full path. As an addition, this commit also fixes
a small memory leak. Tested by sending a declaration again.
Sergio Durigan Junior [Fri, 18 Apr 2014 01:46:30 +0000 (22:46 -0300)]
Add .dir-locals.el
This comment adds the file .dir-locals.el, which is a special file
loaded by Emacs every time a file is visited. For now, it just sets the
coding style to "linux".
Sergio Durigan Junior [Mon, 14 Apr 2014 06:00:44 +0000 (03:00 -0300)]
Update/improve the way we check for libraries
Using PKG_CHECK_MODULES is not very neat because the user might want to
be able to provide a different $LDFLAGS, and this would break the build.
Instead, we should be using autoconf's default
AC_CHECK_LIB/AC_SEARCH_LIBS (in our case, I chosed the latter). This
way, we don't need to modify $LIBS inside configure.ac.
This patch also adds a check for zlib, and updates $CFLAGS accordingly
based on the output of 'pkg-config' for both GNUTLS and zlib libraries.
Sergio Durigan Junior [Mon, 14 Apr 2014 05:13:59 +0000 (02:13 -0300)]
Include extra compiler flags
Given the last attempts to clean up the code, this commit adds extra
compiler flags that are useful to keep the codebase sane. The added
flags, for now, are:
-Wall -Werror -Wextra -Wunused -Wunused-variable
Sergio Durigan Junior [Mon, 14 Apr 2014 05:15:39 +0000 (02:15 -0300)]
Initialize variables (and silence GCC's -Wunused-variable warning)
Using -Wunused-variable to compile the code, GCC gives a false positive
about two variables in the code. This commit initializes those
variables to sane values, in order to silence this warning.
Sergio Durigan Junior [Mon, 14 Apr 2014 05:07:41 +0000 (02:07 -0300)]
Add comments to configure.ac
I think it is important to make configure.ac nicer to read, because
sometimes one has to hack it and decrypt the code in there. This commit
achieves this goal by (a) adding the GPL license header, (b) commenting
the important steps of configure.ac, and (c) updating some parameters
from certain macros.
Sergio Durigan Junior [Mon, 14 Apr 2014 03:48:45 +0000 (00:48 -0300)]
Update call to AM_INIT_AUTOMAKE
According to:
<https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation>
the call to AM_INIT_AUTOMAKE should be updated to take no arguments (in
our case), because the other forms will be deprecated. This patch does
that.
Tested with an older version of automake to make sure nothing breaks.
Thadeu Lima de Souza Cascardo [Tue, 8 Apr 2014 10:13:31 +0000 (07:13 -0300)]
Fix other warnings.
When using -Wextra, there were some signedness related warnings, as well
as size warnings, like using %li for pointer diff on 32-bit systems.
This was build-tested on both a 32-bit ARM and 64-bit x86_64.
Sergio Durigan Junior [Tue, 8 Apr 2014 05:54:48 +0000 (02:54 -0300)]
Fix lots of compiler warnings (casts, unused vars, etc.)
As a preparation for a patch to create a spec file for the project (and
be able to generate RPM's for Fedora-like systems), this commit fixes
lots of warnings generated by the compiler when using more strict
flags.
Fedora, by default, uses the following flags to compile the program:
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -m%ARCH -mtune=generic
This generated lots of warnings (like missing casts, or unused
variables). It is good to fix those in order to keep a sane codebase.
Sergio Durigan Junior [Thu, 3 Apr 2014 04:51:33 +0000 (01:51 -0300)]
Add GPL header to bootstrap script
When I added the bootstrap script, I forgot to add the GPL header to it.
I believe it is a good practice to do that for every file in the
project, so I am fixing it for this specific file.
Sergio Durigan Junior [Sun, 23 Mar 2014 05:19:29 +0000 (02:19 -0300)]
Implement new '--output-dir' option.
This commit implements the new '--output-dir' (or '-o') option. It can
be used to specify where the receipt of the submission will be saved.
Currently, rnetclient saves the receipt in your $HOME, with a generic
name which is composed using the CPF and some random digits. This is
not good because the proprietary IRPF program expects the receipt name
to be the same as the declaration name, but with the extension renamed
from ".DEC" to ".REC".
This patch implements some new concepts. First, if the user provides an
output directory in the command line, we save the receipt there. If she
does not provide anything, then we save the receipt in the current
working dir (CWD), which is a more sensitive decision IMO. Also, and
perhaps more important, is the fact that now the program automagically
detects when the filename has the ".DEC" extension, and uses the same
filename for the receipt in this case (replacing ".DEC" by ".REC", as
expected). This makes the proprietary crap recognize our receipt
out-of-the-box, without having to worry with renamings. It is worth
mentioning that if the user provides a declaration file which does not
have the ".DEC" extension, then rnetclient fallbacks to the old behavior
and saves the filename as "$CPF.REC" (I chose not to use random digits
in the end of the filename).
On a side note, I would like to say that I am not entirely happy with
the way we handle missing directories and files, but that is a topic for
a completely different patch...
Sergio Durigan Junior [Fri, 21 Mar 2014 04:26:55 +0000 (01:26 -0300)]
Fix bug in argument parsing.
The argument '-d' is marked as having an optional argument to it, which
is wrong, because it is mandatory to provide the filename when you use
'-d'.
Thadeu Lima de Souza Cascardo [Sat, 15 Mar 2014 22:24:55 +0000 (19:24 -0300)]
Release v2014.1.
Thadeu Lima de Souza Cascardo [Sat, 15 Mar 2014 22:24:34 +0000 (19:24 -0300)]
Update copyright headers
Sergio Durigan Junior [Sat, 15 Mar 2014 19:28:39 +0000 (16:28 -0300)]
Implement argument parsing via argp.h.
This commit implements argument parsing from the command line via
argp.h. So far, I have added only one parameter ('-d', or
'--declaracao') which is used for providing the filename of the
declaration. I have also marked this argument as optional, so that the
user will still be able to provide the filename without using '-d'.
As an auxiliary support, I enabled the generation of the config.h header
file, so that the program can obtain the package version and the bug
report address directly from configure.ac.
Thadeu Lima de Souza Cascardo [Sat, 15 Mar 2014 22:08:34 +0000 (19:08 -0300)]
Change bug report address to softwares-impostos@fsfla.org.
We have been using softwares-impostos@fsfla.org for patches and other
discussions about rnetclient for some time. It's better that people send
any messages about rnetclient to that mailing list rather than sending
them to only me.
Sergio Durigan Junior [Sat, 15 Mar 2014 20:06:56 +0000 (17:06 -0300)]
Adding .gitignore
This adds .gitignore and makes it ignore build system files
(automatically generated) and object files generated by the compilation.
Thadeu Lima de Souza Cascardo [Sat, 15 Mar 2014 17:21:10 +0000 (14:21 -0300)]
Add Alexandre and Sergio to list of AUTHORS.
Thadeu Lima de Souza Cascardo [Sat, 15 Mar 2014 17:17:56 +0000 (14:17 -0300)]
Check return code for write when sending messages to server.
This not only avoids a warning, but prevents us from moving forward,
when we should report an error, when write fails.
Thadeu Lima de Souza Cascardo [Sat, 15 Mar 2014 17:16:28 +0000 (14:16 -0300)]
Fix compiler warnings on %i format for long int.
On 64-bit platforms, we get the following warning:
decfile.c:213:3: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat]
Using %li works on both 32-bit ARM and 64-bit x86.
Sergio Durigan Junior [Sun, 9 Mar 2014 17:09:04 +0000 (14:09 -0300)]
Add bootstrap.sh script
This commit adds the bootstrap.sh script, which automates the processing
of configure.ac and Makefile.am files in order to generate the build
scripts.
Alexandre Oliva [Mon, 10 Mar 2014 04:31:26 +0000 (01:31 -0300)]
Support large file uploads
If the declaration file is larger than ~64KiB, upload it in multiple
separately-deflated chunks.
Alexandre Oliva [Mon, 10 Mar 2014 04:31:15 +0000 (01:31 -0300)]
unsign char in message parsing
Cast to unsigned any chars read from the buffer while computing lengths
during rnet message parsing.
Remove unused variable while at that.
Alexandre Oliva [Sun, 9 Mar 2014 03:30:02 +0000 (00:30 -0300)]
Check len macros during parsing.
Move header start and end macros to decfile.h as head and tail.
Add sanity checking code during parsing. Adjust the encoder.
Update the format docs.
Alexandre Oliva [Sun, 9 Mar 2014 03:29:54 +0000 (00:29 -0300)]
Use exerc instead of ano to choose encoding lengths
We key sizes on exerc, not on the calendar year the declaration refers
to, so compare exerc instead of ano. Also, test latest years first.
Alexandre Oliva [Sun, 9 Mar 2014 03:29:48 +0000 (00:29 -0300)]
Document operating system as GNU.
The code sets so to GNU, but the docs suggested Linux. Fix the latter
to match.
Alexandre Oliva [Sun, 9 Mar 2014 03:29:43 +0000 (00:29 -0300)]
Update cliente version to that of ReceitaNet 2014.
Odds are the reception side will reject IRPF2014 declarations transferred
by a ReceitaNet implementation that claims to be last year's.
Alexandre Oliva [Sun, 9 Mar 2014 03:29:35 +0000 (00:29 -0300)]
Set versao_java to a fake gij string.
We're not running Java at all, so we might as well pretend to be the
GNU Interpreter for Java.
Thadeu Lima de Souza Cascardo [Fri, 7 Mar 2014 23:28:14 +0000 (20:28 -0300)]
Send right part of the header for 2014.
The code was sending a piece of the header as expected by the server,
considering the header size for 2013. Now, we check for the year we are
submitting for, and use the proper size.
Reported-by: Alexandre Oliva <lxoliva@fsfla.org>
Thadeu Lima de Souza Cascardo [Fri, 7 Mar 2014 23:27:29 +0000 (20:27 -0300)]
Use macros for the header size.
For each year, use a macro for the header size we expect.
Alexandre Oliva [Thu, 6 Mar 2014 16:17:12 +0000 (13:17 -0300)]
Grow message by just the needed amount
Do not allocate more space than required for the message to grow.
We used to nearly double the amount of space every time, which is
nice to avoid quadratic complexity, but files are small enough
that it probably doesn't matter much, and it just makes things
confusing.
Alexandre Oliva [Thu, 6 Mar 2014 13:07:22 +0000 (10:07 -0300)]
Convert chars to len with unsigned buffer
Introduce chars2len to compute a len out of an unsigned char buf[2].
This avoids problems when any of the chars is negative, if char is
signed.
Alexandre Oliva [Thu, 6 Mar 2014 13:07:14 +0000 (10:07 -0300)]
Silence compiler warning in 64-bit mode
Casting an int to gnutls_transport_ptr_t gets a warning when
sizeof(void*)!=sizeof(int). Casting the int to int_ptr first
silences the warning.
Thadeu Lima de Souza Cascardo [Thu, 6 Mar 2014 11:47:18 +0000 (08:47 -0300)]
Add documentation about where to find header documentation.
The DEC file "documentation" can be found as a resource file at Receita
Federal IRPF JAR.
Thadeu Lima de Souza Cascardo [Thu, 6 Mar 2014 11:44:35 +0000 (08:44 -0300)]
Release v2014.0.
Use the year in the release version, indicating support for that year.
Thadeu Lima de Souza Cascardo [Thu, 6 Mar 2014 11:42:07 +0000 (08:42 -0300)]
Distinguish between 2013 and 2014.
The file format changes throughout the years, with added fields in the
header. Verify the size of the header and the year indicated, and add
support for year 2014.
Thadeu Lima de Souza Cascardo [Thu, 6 Mar 2014 11:30:35 +0000 (08:30 -0300)]
Use errno to indicate error in parsing file.
Thadeu Lima de Souza Cascardo [Sat, 2 Nov 2013 21:25:39 +0000 (19:25 -0200)]
Release v0.1.1.
Thadeu Lima de Souza Cascardo [Sat, 2 Nov 2013 21:19:10 +0000 (19:19 -0200)]
Indicate a retifying field in the header.
Use the field in the DEC file to determine if this is a retifying file
or note, and use this in the hash in the first message.
Thadeu Lima de Souza Cascardo [Sat, 2 Nov 2013 21:09:15 +0000 (19:09 -0200)]
Sixth byte in some messages are not always 1.
The first message, with the hash, uses the sixth byte as 1. The second
message, on the other hand, uses it as 0.
Thadeu Lima de Souza Cascardo [Sat, 2 Nov 2013 21:03:54 +0000 (19:03 -0200)]
Handle uncompressed messages.
Some messages may come uncompressed, and we need to handle them.
Thadeu Lima de Souza Cascardo [Sat, 2 Nov 2013 21:03:01 +0000 (19:03 -0200)]
Provide function to remove a header from a message.
Remove the first n bytes from a message.
Thadeu Lima de Souza Cascardo [Sat, 2 Nov 2013 20:53:00 +0000 (18:53 -0200)]
Fix use of deflate output length.
avail_out has the remaining bytes in the buffer, not the number of bytes
output, which is found on total_out.
Thadeu Lima de Souza Cascardo [Fri, 14 Jun 2013 11:58:48 +0000 (08:58 -0300)]
Update TODO.
Thadeu Lima de Souza Cascardo [Fri, 14 Jun 2013 11:53:25 +0000 (08:53 -0300)]
Just to be safe, show message and try to save file.
When we receive a response we are not sure how to handle, try to find a
message and a file in the response and use them.
Thadeu Lima de Souza Cascardo [Fri, 14 Jun 2013 11:50:58 +0000 (08:50 -0300)]
Handle error response.
Thadeu Lima de Souza Cascardo [Fri, 14 Jun 2013 11:46:16 +0000 (08:46 -0300)]
Handle response when DEC has already been transmitted.
The response given by the server when the file has already been
transmitted includes a message to the user and the receipt file, which
is saved at the user's home or a temporary directory with a unique
filename.
Thadeu Lima de Souza Cascardo [Fri, 14 Jun 2013 11:45:33 +0000 (08:45 -0300)]
Parse key/value message, extracting the values of its keys.
Thadeu Lima de Souza Cascardo [Fri, 14 Jun 2013 10:58:36 +0000 (07:58 -0300)]
Check for responses and send second message.
This completes the protocol. The responses need to be decoded and
handled now.
Thadeu Lima de Souza Cascardo [Fri, 14 Jun 2013 00:19:32 +0000 (21:19 -0300)]
Create helpers to send and receive messages.
Needs to do some input and error checking and maybe add some timeouts.
Thadeu Lima de Souza Cascardo [Fri, 14 Jun 2013 00:18:32 +0000 (21:18 -0300)]
Fix inflate.
Inflate support was miscalculating the size of the output buffer.
Thadeu Lima de Souza Cascardo [Thu, 13 Jun 2013 11:21:46 +0000 (08:21 -0300)]
Update TODO.
Thadeu Lima de Souza Cascardo [Thu, 13 Jun 2013 11:15:32 +0000 (08:15 -0300)]
Add the missing field in the first message.
It's composed of part of the header register. It's more simple to build
it as a substring of the register itself, than composing it field by
field.
Thadeu Lima de Souza Cascardo [Thu, 13 Jun 2013 11:14:02 +0000 (08:14 -0300)]
Fix size of field.
tam_dados_val_chave is, in fact, only 4 bytes long. Due to a known bug
in the decoder used during reverse engineering, the value of
tam_dados_val was appended to the value of tam_dados_val_chave, since
the two keys have the same prefix.
Thadeu Lima de Souza Cascardo [Thu, 13 Jun 2013 11:00:47 +0000 (08:00 -0300)]
Fix key for type of identification.
It's called tp_ni, not tipo_ni.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 23:17:16 +0000 (20:17 -0300)]
Calculate message hash and use it.
Use gcrypt to calculate stripped file MD5 hash and add it to the
key/value message.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 23:08:37 +0000 (20:08 -0300)]
Allow an arbitrarily-sized buffer into the key/value message.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 22:55:43 +0000 (19:55 -0300)]
Add transmission length to the key/value message.
Use the length of the stripped file that is going to be transmitted for
some of the keys in the first message.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 22:07:40 +0000 (19:07 -0300)]
Strip the DEC file from control numbers.
In order to send the second part of the message, we need to strip the
declaration registers from their control numbers.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 22:01:37 +0000 (19:01 -0300)]
Fix bug when expanding message.
If we need to expand a message while adding a field to it, we need to
update the pointer we are using, and the one we are returning back.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 21:43:28 +0000 (18:43 -0300)]
Use a pointer for message functions when it needs a resize.
Always use a pointer to a pointer to struct rnet_message in those
functions where it is possible that it may be resized.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:40:58 +0000 (08:40 -0300)]
Add more fields to the first message.
The only missing fields are the size and hash of the second message and
part of the header register.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:39:15 +0000 (08:39 -0300)]
Add 64-bit values support for rnet_message.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:34:55 +0000 (08:34 -0300)]
Include some extra fields in the message.
These fields are mostly machine/software/network identity numbers. Some
choices here may be political. Perhaps we should let the user pick them
up at some point, as long as there are sensible defaults.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:29:21 +0000 (08:29 -0300)]
Allow a 16-bit value to be added to the key/value pair.
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.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:26:36 +0000 (08:26 -0300)]
Add more fields to the first message.
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.
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.
Thadeu Lima de Souza Cascardo [Wed, 12 Jun 2013 11:14:55 +0000 (08:14 -0300)]
Build rnet_message.
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".
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.
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.
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.
Thadeu Lima de Souza Cascardo [Tue, 11 Jun 2013 10:55:07 +0000 (07:55 -0300)]
Remove handshake success message
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.
Thadeu Lima de Souza Cascardo [Sat, 8 Jun 2013 11:50:26 +0000 (08:50 -0300)]
Update TODO
Thadeu Lima de Souza Cascardo [Sat, 8 Jun 2013 11:50:18 +0000 (08:50 -0300)]
Update copyright years
Thadeu Lima de Souza Cascardo [Fri, 7 Jun 2013 11:33:54 +0000 (08:33 -0300)]
Document server answer and next client message.
Thadeu Lima de Souza Cascardo [Tue, 28 May 2013 11:25:20 +0000 (08:25 -0300)]
Complete format documentation.
Thadeu Lima de Souza Cascardo [Tue, 28 May 2013 09:17:03 +0000 (06:17 -0300)]
Document message header.
Thadeu Lima de Souza Cascardo [Tue, 28 May 2013 09:15:46 +0000 (06:15 -0300)]
Start of documentation about the protocol.
Thadeu Lima de Souza Cascardo [Fri, 7 Jun 2013 22:04:15 +0000 (19:04 -0300)]
Create a function for the first handshake.