1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

1161 Commits

Author SHA1 Message Date
Oleg Hahm
04493cc026 Merge pull request #1407 from LudwigOrtmann/issue-571
sys/vtimer: spin on short duration in vtimer_sleep
2014-07-16 22:14:27 +02:00
Oleg Hahm
344f702366 shell: prepare a rudimentary IEEE 802.15.4 packet
The transceiver module expects an `ieee802154_packet_t` instead of a
`radio_packet_t` if the device supports the IEEE 802.15.4 packet format.
This commit fixes the corresponding transceiver shell command for
`txtsnd` to set destination address (short address mode), payload, and
length accordingly.
2014-07-16 16:07:49 +02:00
René Kijewski
d4ff405e21 Merge pull request #1401 from LudwigOrtmann/scnetif_error
sys/net_if, make: fixup
2014-07-15 01:18:43 +02:00
Hauke Petersen
7ec61c578d vtimer: renamed e|dINT to disable|restoreIRQ 2014-07-14 18:10:06 +02:00
Ludwig Ortmann
428e085c53 sys/shell: fix error when not using sixlowpan
```
/sys/shell/commands/sc_net_if.c:631:27: error: ‘IPV6_MAX_ADDR_STR_LEN’ undeclared (first use in this function)
             char addr_str[IPV6_MAX_ADDR_STR_LEN];
                           ^
```
2014-07-14 18:00:05 +02:00
Sebastian Sontberg
af3c54e3a2 pnet: Fix INADDR_ANY and INADDR_BROADCAST
INADDR_ANY and INADDR_BROADCAST should not be initializers.
2014-07-14 14:13:13 +02:00
Ludwig Ortmann
3e965f926a sys/vtimer: spin on short duration in vtimer_sleep
closes #571
2014-07-13 06:56:17 +02:00
Christian Mehlis
7169fd1107 Merge pull request #1362 from OlegHahm/ccnl_eliminate_warning
CCN_lite eliminate warning
2014-07-10 23:56:39 +02:00
Oleg Hahm
a6e97a4f75 Merge pull request #1034 from Kijewski/vtimer-callbacks
vtimer: fix callback usage
2014-07-10 17:12:23 +02:00
Ludwig Ortmann
a992d4d848 sys/transceiver: use size_t instead of u8 in loops 2014-07-10 14:11:48 +02:00
Ludwig Ortmann
8e93886d36 sys/transceiver: refactor un/register
remove race conditions
make less restrictive (allow double-un/registers)
make loops more readable
2014-07-10 14:11:48 +02:00
Ludwig Ortmann
d034cfac29 sys/transceiver: implement transceiver_unregister 2014-07-10 14:11:48 +02:00
Ludwig Ortmann
c264338e31 sys/transceiver: fix t9r_register API compliance 2014-07-10 14:11:48 +02:00
René Kijewski
ba1a15535b core: remove extra thread_create_arg() function 2014-07-09 10:28:23 +02:00
Oleg Hahm
1518d6ac64 Merge pull request #1390 from cgundogan/fix_socket_internal_t_packed_attr
destiny: deleting packed attribute from socket_internal_t
2014-07-08 22:33:54 +02:00
Cenk Gündoğan
8724eb1169 destiny: Adjust TCP_STACK_SIZE
Currently, the TCP_STACK_SIZE is `KERNEL_CONF_STACKSIZE_DEFAULT`.
However, since printf statements are used in the tcp relevant code,
this stack size is too small (esp. for MSBA2).
2014-07-08 21:30:58 +02:00
Cenk Gündoğan
b5e7460d45 destiny: deleting packed attribute from socket_internal_t
While testing the tcp implementation on MSBA2 I noticed that
the value of `tcp_input_buffer_end` gets changed whenever acquiring or
releasing the mutex of the struct on the server side.

After deleting the packed attribute of the struct this problem was
resolved and the value stayed the same after acquiring and releasing.

This problem could maybe arise from badly placed cache lines due to
missing padding... I am not sure.

Anyway, I guess using the packed attribute is useless here and makes it
more error-prone.
2014-07-08 20:40:55 +02:00
Ludwig Ortmann
295f32ac1b sys/ps: fix comment style, superfluous declaration 2014-07-04 16:38:22 +02:00
Ludwig Ortmann
70dae32a3f sys/ps: s/float/int for runtime
The high precision isn't needed, use per mille instead.
Circumvents printf problems on some platforms.

Also: prevent division by zero.
2014-07-04 16:38:22 +02:00
Oleg Hahm
53f7bea52f Merge pull request #1167 from fabianbrandt/rpl_base_split
Split RPL into core and mode related functions.
2014-07-04 11:21:05 +02:00
Fabian Brandt
7fb462cd2c Split RPL into core and mode related functions. 2014-07-03 20:23:57 +02:00
Fabian Brandt
62236e5d54 Introducing a source routing header for RPL. 2014-07-02 20:35:14 +02:00
Oleg Hahm
613caf3914 ccnl: eliminated empty translation unit warning 2014-07-02 19:23:14 +02:00
Oleg Hahm
0affcaf6e1 ccnl: fixed commenting style 2014-07-02 19:22:55 +02:00
René Kijewski
63dd8546af Merge pull request #1335 from Kijewski/fix-all-warnings-for-native-and-qemu-i386
Fix all warnings for native and qemu-i386
2014-07-02 10:58:48 +02:00
Christian Mehlis
381fec1fa8 Merge pull request #1301 from cgundogan/fix_tcp_handshake_seq_ack_rfc_compliancy
destiny: wireshark revealed wrong seq/ack nr. in tcp handshake
2014-06-30 22:05:23 +02:00
René Kijewski
3063e3c2b1 Fix all warnings for native and qemu-i386
Missing returns, unused variables (only used for debugging), empty
translation units, missing function prototypes, and GNU extensions.
2014-06-24 16:50:32 +02:00
Oleg Hahm
fda7ce12d2 Merge pull request #1321 from cgundogan/fix_missing_ack_bit
destiny: set ack bit for (almost) all segments after syn
2014-06-24 11:16:37 +02:00
Cenk Gündoğan
75546fcf6c destiny: set ack bit for (almost) all segments after syn
The current implementation does not set the ack bit
for outgoing data segments and the fin segment.

However, RFC793 states that all segments
should have an ack bit set in order to present a valid
ack nr. in outgoing segments.

Currently, data segments and acknowledgement segments
are distinguished by the existence of their ack bit.
With the new assumption, that both of these types of
segments need an ack bit set, I had to change several
parts of the current implementation to make this
decision by inspecting the payload size.

destiny: added parens
2014-06-24 10:44:11 +02:00
Cenk Gündoğan
400286168f destiny: wireshark revealed wrong seq/ack nr. in tcp handshake
Capturing the tcp handshake with wireshark revealed that the
sequence and ack nrs. are not rfc compliant.
I did the changes based on
http://tools.ietf.org/html/rfc793#page-52 to http://tools.ietf.org/html/rfc793#page-72
2014-06-24 10:21:23 +02:00
Oleg Hahm
9f39226108 shell: added command to print all ignored addresses 2014-06-24 10:11:06 +02:00
Oleg Hahm
36b9f7e7d7 Merge pull request #1257 from Kijewski/shell-fix-newline
shell: fix newlines
2014-06-22 23:56:36 +02:00
Oleg Hahm
6f17f0c60a Merge pull request #1105 from Kijewski/shell-print-not-found
shell: print command if not found
2014-06-22 21:03:30 +02:00
Oleg Hahm
eedc16815c Merge pull request #891 from OlegHahm/rpl_debug
net: some debug code
2014-06-22 19:27:18 +02:00
Hauke Petersen
839955cd05 sys: added color module 2014-06-22 13:53:01 +02:00
René Kijewski
14601c0c38 Merge pull request #1299 from phiros/timex_bugfix_and_improvement
Timex bugfix and improvement
2014-06-19 13:18:15 +02:00
Philipp Rosenkranz
0bf6ce22f3 added conv function from uint64 to timex_t and one minor bug fix 2014-06-19 12:40:24 +02:00
René Kijewski
467b41ad49 make: easifier usage of module subdirectories
Many modules have subdirectories. Often these subdirectories should only
be included under certain circumstances. Modules that use submodules
currently need to use this pattern:

```make
DIRS = …

all: $(BINDIR)$(MODULE).a
   @for i in $(DIRS) ; do $(MAKE) -C $$i ; done ;

include $(RIOTBASE)/Makefile.base

clean::
   @for i in $(DIRS) ; do $(MAKE) -C $$i clean ; done ;
```

This PR moves the `all:` and `clean::` boilerplate into `Makefile.base`.
2014-06-17 15:49:32 +02:00
René Kijewski
840c0f0a57 make: detect their module name automatically
For many modules the `Makefile` contains a line like
```
MODULE:=$(shell basename $(CURDIR))
```
This conclusively shows that we do not have to set the module name
manually.

This PR removes the need to set the module name manually, if it is the
same as the basename. E.g. for `…/sys/vtimer/Makefile` the variable
make `MODULE` will still be `vtimer`, because it is the basename of the
Makefile.
2014-06-17 15:49:32 +02:00
Christian Mehlis
997dcd7e88 Merge pull request #1302 from cgundogan/fix_tcp_header_data_offset
destiny: using a bit field for tcp_header->data_offset is more convenient
2014-06-14 15:40:49 +02:00
Christian Mehlis
50a07d9874 Merge pull request #1280 from cgundogan/fix_send_tcp_error_check
destiny: fixed condition for error handling of send_tcp in destiny_socket_send
2014-06-12 09:55:37 +02:00
Christian Mehlis
2350809536 pnet: silence unused argument warnings 2014-06-11 13:36:41 +02:00
Oleg Hahm
f6cd96b023 Merge pull request #1300 from cgundogan/fix_wrong_byte_order_ipv6_length
destiny: change byte order of ipv6_header->length
2014-06-09 22:01:41 +02:00
Cenk Gündoğan
ecf47b1f48 destiny: using a bit field for tcp_header->data_offset is more convenient
In the current implementation the data offset is coded into an uint8_t.
Of this uint8_t only 3 bits apply for the data offset.
The remaining bits represent reserved flags for future use.
However, a proper bit masking is forgotten in order
to obtain the data offset part of this uint8_t.

Therefore, defining this uint8_t as a bit field allows a more convenient
method of access.
2014-06-09 19:37:37 +02:00
Cenk Gündoğan
97da23051a destiny: change byte order of ipv6_header->length
When accessing the length field of an ipv6_header a byte order switch (host -> network) is necessary.
Otherwise, it breaks calculations or the checksum and other tcp related computations.
Furthermore, when writing to ipv6_header->length it is important to switch this
from host byte order to network byte order.
2014-06-08 20:50:45 +02:00
Cenk Gündoğan
7584ffe887 destiny: fixed condition for error handling
send_tcp returns either the length of the sent data,
or -1, if an error was detected.

The current implementation checks for != 1.
This results in executing the error case, although
there was semantically no error returned from send_tcp.
2014-06-05 14:17:48 +02:00
Cenk Gündoğan
43b7a393b1 destiny: wireshark compliant tcp flags
This enum is also used to set the tcp flags within a tcp header.
With the current values in this enum, wireshark is not able to
recognize the tcp segments as their actual tcp type,
and thus odd messages in wireshark appear.

destiny: reusing tcp flags for combinations
2014-06-05 13:15:00 +02:00
Cenk Gündoğan
f41fe7bb04 destiny: segfault due to dereferencing nullpointer
get_socket(i) returns NULL, when no specific socket is found.
Without an appropriate check for NULL, the current state
of the code leads to a segfault.

destiny: added parens

destiny: continuing the loop makes more sense than returning at first sight of NULL
2014-06-03 22:48:01 +02:00
René Kijewski
2231a315d4 vtimer: fix callback usage
There is no need to test the "handler" set in the vtimer struct, and
have some code executed then. We just can make the code to execute the
handler. To lengthy `if else if`, just a call.
2014-06-03 21:07:59 +02:00
René Kijewski
05a4bf7f04 Merge pull request #1057 from Kijewski/sched_switch-current_prio
core: imply current_prio in `sched_switch()`
2014-06-03 15:59:23 +02:00