pkarashchenko commented on code in PR #1399:
URL:
https://github.com/apache/incubator-nuttx-apps/pull/1399#discussion_r1015156214
##########
netutils/iptlite/iptlite_main.c:
##########
@@ -0,0 +1,94 @@
+/****************************************************************************
+ * apps/netutils/iptlite/iptlite_main.c
+ * iptlite networking application
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include "../../../nuttx/net/devif/devif.h"
+#include <nuttx/config.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+void listall_rules(void)
+{
+ int rules_counter = nflite_get_rules_counter();
+ char** table = nflite_listall();
+
+ printf("%3s %10s %16s %16s %9s %9s\n", \
+ "ID", "RULE", "SRC IPADDR", "DEST IPADDR", "SRC PORT", "DEST PORT");
+
+ for (int i = 0; i < rules_counter; i++)
+ {
+ for (int j = 0; j < RULE_INFO_MAX_SIZE; j++)
+ {
+ printf("%c", table[i][j]);
+ }
+
+ printf("\n");
+ }
+}
+
+void add_rule(int rule, char * srcip, char * destip, char * srcprt, \
+char * destprt)
+{
+ in_addr_t srcipaddr, destipaddr;
+ in_port_t srcport, destport;
Review Comment:
```suggestion
in_addr_t srcipaddr;
in_addr_t destipaddr;
in_port_t srcport;
in_port_t destport;
```
##########
netutils/iptlite/iptlite_main.c:
##########
@@ -0,0 +1,94 @@
+/****************************************************************************
+ * apps/netutils/iptlite/iptlite_main.c
+ * iptlite networking application
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include "../../../nuttx/net/devif/devif.h"
+#include <nuttx/config.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+void listall_rules(void)
+{
+ int rules_counter = nflite_get_rules_counter();
+ char** table = nflite_listall();
+
+ printf("%3s %10s %16s %16s %9s %9s\n", \
+ "ID", "RULE", "SRC IPADDR", "DEST IPADDR", "SRC PORT", "DEST PORT");
+
+ for (int i = 0; i < rules_counter; i++)
+ {
+ for (int j = 0; j < RULE_INFO_MAX_SIZE; j++)
+ {
+ printf("%c", table[i][j]);
+ }
+
+ printf("\n");
+ }
+}
+
+void add_rule(int rule, char * srcip, char * destip, char * srcprt, \
+char * destprt)
Review Comment:
```suggestion
void add_rule(int rule, FAR char *srcip, FAR char *destip, FAR char *srcprt,
FAR char *destprt)
```
##########
netutils/iptlite/iptlite_main.c:
##########
@@ -0,0 +1,94 @@
+/****************************************************************************
+ * apps/netutils/iptlite/iptlite_main.c
+ * iptlite networking application
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include "../../../nuttx/net/devif/devif.h"
+#include <nuttx/config.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+void listall_rules(void)
+{
+ int rules_counter = nflite_get_rules_counter();
+ char** table = nflite_listall();
Review Comment:
```suggestion
FAR char** table = nflite_listall();
```
##########
netutils/iptlite/iptlite_main.c:
##########
@@ -0,0 +1,94 @@
+/****************************************************************************
Review Comment:
license header is missing
##########
netutils/iptlite/iptlite_main.c:
##########
@@ -0,0 +1,94 @@
+/****************************************************************************
+ * apps/netutils/iptlite/iptlite_main.c
+ * iptlite networking application
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include "../../../nuttx/net/devif/devif.h"
Review Comment:
Can we somehow overcome this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]