Skip to content
Snippets Groups Projects
Commit fe174fef authored by Martine Lenders's avatar Martine Lenders
Browse files

Fix some coding conventions in border router driver

parent 920e48be
No related branches found
No related tags found
No related merge requests found
......@@ -150,8 +150,8 @@ void flowcontrol_deliver_from_tty(const border_packet_t *packet, int len)
slot = &slwin_stat.recv_win[packet->seq_num % BORDER_RWS];
if (!in_window(packet->seq_num,
slwin_stat.next_exp,
slwin_stat.next_exp + BORDER_RWS - 1)) {
slwin_stat.next_exp,
slwin_stat.next_exp + BORDER_RWS - 1)) {
return;
}
......
......@@ -84,7 +84,7 @@ int readpacket(uint8_t *packet_buf, size_t size)
if (esc) {
esc = 0;
switch(byte) {
switch (byte) {
case (END_ESC): {
*line_buf_ptr++ = END;
continue;
......@@ -125,7 +125,7 @@ int writepacket(uint8_t *packet_buf, size_t size)
}
while ((byte_ptr - packet_buf) < size) {
switch(*byte_ptr) {
switch (*byte_ptr) {
case (END): {
*byte_ptr = END_ESC;
*tmp_ptr = ESC;
......@@ -158,7 +158,7 @@ int writepacket(uint8_t *packet_buf, size_t size)
void demultiplex(const border_packet_t *packet, int len)
{
switch(packet->type) {
switch (packet->type) {
case (BORDER_PACKET_RAW_TYPE): {
printf("\033[00;33m[via serial interface] %s\033[00m\n",
((unsigned char *)packet) + sizeof(border_packet_t)
......@@ -169,7 +169,7 @@ void demultiplex(const border_packet_t *packet, int len)
case (BORDER_PACKET_L3_TYPE): {
border_l3_header_t *l3_header_buf = (border_l3_header_t *)packet;
switch(l3_header_buf->ethertype) {
switch (l3_header_buf->ethertype) {
case (ETHERTYPE_IPV6): {
printf("INFO: IPv6-Packet %d received\n", l3_header_buf->seq_num);
struct ip6_hdr *ip6_buf = (struct ip6_hdr *)(((unsigned char *)packet) + sizeof(border_l3_header_t));
......@@ -188,7 +188,7 @@ void demultiplex(const border_packet_t *packet, int len)
case (BORDER_PACKET_CONF_TYPE): {
border_conf_header_t *conf_header_buf = (border_conf_header_t *)packet;
switch(conf_header_buf->conftype) {
switch (conf_header_buf->conftype) {
case (BORDER_CONF_SYNACK): {
printf("INFO: SYNACK-Packet %d received\n", conf_header_buf->seq_num);
signal_connection_established();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment