Blame view

RIOT/tests/lwip/common.h 1.51 KB
fb11e647   vrobic   reseau statique a...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  /*
   * Copyright (C) 2016 Martine Lenders <mlenders@inf.fu-berlin.de>
   *
   * This file is subject to the terms and conditions of the GNU Lesser
   * General Public License v2.1. See the file LICENSE in the top level
   * directory for more details.
   */
  
  /**
   * @ingroup     tests
   * @{
   *
   * @file
   * @brief   Definitions for tests/lwip/
   *
   * @author  Martine Lenders <mlenders@inf.fu-berlin.de>
   */
  #ifndef MAIN_H_
  #define MAIN_H_
  
  #include <stdint.h>
  #include <sys/types.h>
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  /**
   * @brief   Application configuration
   * @{
   */
  #define CONN_INBUF_SIZE         (256)
  #define SERVER_MSG_QUEUE_SIZE   (8)
  #define SERVER_BUFFER_SIZE      (64)
  /**
   * @}
   */
  
  /**
   * @brief   Converts hex string to byte array.
   *
   * @param[out] out  Resulting byte array
   * @param[in] in    `\0` terminated string. Non-hex characters (all except 0-9, a-f, A-F)
   *                  will be ignored.
   *
   * @return  Length of @p out.
   */
  size_t hex2ints(uint8_t *out, const char *in);
  
  #ifdef MODULE_CONN_IP
  /**
   * @brief   Raw IP shell command
   *
   * @param[in] argc  number of arguments
   * @param[in] argv  array of arguments
   *
   * @return  0 on success
   * @return  other on error
   */
  int ip_cmd(int argc, char **argv);
  #endif
  
  #ifdef MODULE_CONN_UDP
  /**
   * @brief   UDP IP shell command
   *
   * @param[in] argc  number of arguments
   * @param[in] argv  array of arguments
   *
   * @return  0 on success
   * @return  other on error
   */
  int udp_cmd(int argc, char **argv);
  #endif
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif /* MAIN_H_ */
  /** @} */