Commit 59642d51 authored by Denis Filatov's avatar Denis Filatov
Browse files

improve web interface

remove unneeded dependencies
set version 1.0.0
parent c241f063
Loading
Loading
Loading
Loading
+8 −5
Original line number Original line Diff line number Diff line
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk


PKG_NAME:=its_bridge
PKG_NAME:=its_bridge
PKG_REFV:=2
PKG_REFV:=2
PKG_VERSION:=0.1.2
PKG_VERSION:=1.0.0
PKG_RELEASE:=3
PKG_RELEASE:=1


include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/package.mk


@@ -18,7 +18,7 @@ define Package/its_bridge
  SECTION:=utils
  SECTION:=utils
  CATEGORY:=Utilities
  CATEGORY:=Utilities
  TITLE:=ITS bridge clients and server
  TITLE:=ITS bridge clients and server
  DEPENDS:=+libpcap +libmicrohttpd +libuci
  DEPENDS:=+libpcap
endef
endef


define Build/Prepare
define Build/Prepare
@@ -30,7 +30,7 @@ define Build/Configure
endef
endef


#TARGET_CFLAGS += -ggdb3
#TARGET_CFLAGS += -ggdb3
MAKE_FLAGS += CFLAGS="$(TARGET_CFLAGS) -Wall -I include -DUSE_UCI" LDFLAGS="-luci"
MAKE_FLAGS += CFLAGS="$(TARGET_CFLAGS) -Wall -I include"


define Package/its_bridge/install
define Package/its_bridge/install
	$(INSTALL_DIR) $(1)/usr/bin/
	$(INSTALL_DIR) $(1)/usr/bin/
@@ -41,12 +41,15 @@ endef


define Package/its_bridge/preinst
define Package/its_bridge/preinst
#!/bin/sh
#!/bin/sh
uci add ucitrack its_bridge
uci set ucitrack.@its_bridge[0].init='its_bridge'
uci set ucitrack.@its_bridge[0].init='its_bridge'
uci commit ucitrack
exit 0
exit 0
endef
endef
define Package/its_bridge/prerm
define Package/its_bridge/prerm
#!/bin/sh
#!/bin/sh
uci del ucitrack.@its_bridge[0]
uci delete ucitrack.@its_bridge[0]
uc commit ucitrack
exit 0
exit 0
endef
endef
$(eval $(call BuildPackage,its_bridge))
$(eval $(call BuildPackage,its_bridge))
+2 −2
Original line number Original line Diff line number Diff line
@@ -13,8 +13,8 @@ open_its_port() {
    [ -z "$port" ] && port=5000
    [ -z "$port" ] && port=5000
    for p in 0 1 2 3 4 5 6 7 8 9; do
    for p in 0 1 2 3 4 5 6 7 8 9; do
        v=`uci get glfw.@opening[$p].port 2>/dev/null`
        v=`uci get glfw.@opening[$p].port 2>/dev/null`
        if [ "$v" == "$port" ]; then
        if [ -z "$v" -o "$v" == "$port" ]; then
           echo "Port $port already opened"
#           echo "Port $port already opened"
           break
           break
        fi
        fi
    done
    done
+21 −2
Original line number Original line Diff line number Diff line
@@ -15,12 +15,21 @@ s = m:section(TypedSection, "its", translate("ITS Configuration"))
s.addremove = false
s.addremove = false
s.anonymous = true
s.anonymous = true


o=s:option(Value, "nic", 
o=s:option(Value, "nic", translate("ITS network interface"), translate("The network interface where the ITS device is connected"))
    translate("ITS network interface"))
o.template = "cbi/network_ifacelist"
o.widget = "radio"
o.nobridges = true
o.noaliases = true
o.rmempty = true
o.noinactive = true
o.nocreate = true
--o.network = arg[1]


o=s:option(Value, "mac",
o=s:option(Value, "mac",
    translate("ITS device MAC address"),translate("MAC address of connected ITS device"))
    translate("ITS device MAC address"),translate("MAC address of connected ITS device"))
o.rmempty  = true
o.rmempty  = true
--o.datatype = "macaddr"



s = m:section(TypedSection, "udp", translate("UDP Configuration"))
s = m:section(TypedSection, "udp", translate("UDP Configuration"))
s.addremove = false
s.addremove = false
@@ -29,10 +38,19 @@ s.anonymous = true
o=s:option(Value, "nic",
o=s:option(Value, "nic",
	translate("UDP Interface"), translate("UDP interface (optional)"))
	translate("UDP Interface"), translate("UDP interface (optional)"))
o.optional = true
o.optional = true
o.template = "cbi/network_ifacelist"
o.widget = "radio"
--o.nobridges = true
o.noaliases = true
o.noinactive = true
o.rmempty = true
o.nocreate = true
--o.network = arg[1]


o=s:option(Value, "send",
o=s:option(Value, "send",
	translate("Destnation Address"), translate("IP address or multicast group to send ITS packets"))
	translate("Destnation Address"), translate("IP address or multicast group to send ITS packets"))
o.datatype = "ipaddr"
o.datatype = "ipaddr"
o.datatype = "ip4addr"


o=s:option(Value, "port",
o=s:option(Value, "port",
	translate("Destnation Port"), translate("Port to send ITS packets"))
	translate("Destnation Port"), translate("Port to send ITS packets"))
@@ -42,6 +60,7 @@ o.datatype = "port"
o=s:option(DynamicList, "recv",
o=s:option(DynamicList, "recv",
	translate("Remote Addresses"), translate("IP addresses or multicast groups to recive ITS packets"))
	translate("Remote Addresses"), translate("IP addresses or multicast groups to recive ITS packets"))
o.addremove = true
o.addremove = true
o.datatype = "ip4addr"


--m.submit = translate("Apply")
--m.submit = translate("Apply")


+1 −1
Original line number Original line Diff line number Diff line
@@ -7,4 +7,4 @@ csrc := utils.c
all: $(bins)
all: $(bins)


$(bins) : % : %.c $(csrc)
$(bins) : % : %.c $(csrc)
	$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) -lpcap -lmicrohttpd
	$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) -lpcap