Skip to content

Commit fcde2e8

Browse files
committed
Rename to ChirpStack UDP Forwarder.
1 parent 56f2d5f commit fcde2e8

File tree

7 files changed

+31
-26
lines changed

7 files changed

+31
-26
lines changed

Dockerfile-devel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ RUN mkdir -p /tmp
2424
RUN cd /tmp && git clone https://github.com/seife/opkg-utils.git && cd /tmp/opkg-utils && PREFIX=/usr make install
2525

2626
ENV LLVM_CONFIG_PATH=llvm-config
27-
ENV PROJECT_PATH=/chirpstack-udp-bridge
27+
ENV PROJECT_PATH=/chirpstack-udp-forwarder
2828
RUN mkdir -p $PROJECT_PATH
2929
WORKDIR $PROJECT_PATH
3030

31-
COPY . /chirpstack-udp-bridge
31+
COPY . /chirpstack-udp-forwarder
3232
RUN cargo fetch

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Orne Brocaar
3+
Copyright (c) 2022 Orne Brocaar
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
VERSION := $(shell git describe --always |sed -e "s/^v//")
22

3+
devshell:
4+
docker-compose run --rm chirpstack-udp-forwarder bash
5+
36
test:
4-
docker-compose run --rm chirpstack-udp-bridge cargo test
7+
docker-compose run --rm chirpstack-udp-forwarder cargo test

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# ChirpStack UDP Bridge
1+
# ChirpStack UDP Forwarder
22

3-
The ChirpStack UDP Bridge is an UDP forwarder for the [ChirpStack Concentratord](https://www.chirpstack.io/concentratord/)
3+
The ChirpStack UDP Forwarder is an UDP forwarder for the [ChirpStack Concentratord](https://www.chirpstack.io/concentratord/)
44
and is compatible with the [Semtech UDP protocol](https://github.com/Lora-net/packet_forwarder/blob/master/PROTOCOL.TXT).
55

66
## Configuration
77

88
Configuration example:
99

1010
```toml
11-
# UDP Bridge configuration.
12-
[udp_bridge]
11+
# UDP Forwarder configuration.
12+
[udp_forwarder]
1313

1414
# Log level.
1515
#
@@ -35,19 +35,19 @@ Configuration example:
3535

3636
# Servers to forward the data to using UDP.
3737
# This section can be repeated.
38-
[[udp_bridge.servers]]
38+
[[udp_forwarder.servers]]
3939
# Server (hostname:port).
4040
server="localhost:1700"
4141

4242
# Keepalive interval (seconds).
4343
#
44-
# In this interval, the ChirpStack UDP Bridge will send keepalive
44+
# In this interval, the ChirpStack UDP Forwarder will send keepalive
4545
# frames to the server, which must be answered by an acknowledgement.
4646
keepalive_interval_secs=10
4747

4848
# Max. allowed keepalive failures.
4949
#
50-
# After the max. number has been reached, the ChirpStack UDP Bridge will
50+
# After the max. number has been reached, the ChirpStack UDP Forwarder will
5151
# 're-connect' to the server, meaning it will also re-resolve the DNS in case
5252
# the server address is a hostname.
5353
keepalive_max_failures=12
@@ -69,5 +69,5 @@ Configuration example:
6969

7070
## License
7171

72-
ChirpStack Concentratord is distributed under the MIT license. See
72+
ChirpStack UDP Forwarder is distributed under the MIT license. See
7373
[LICENSE](https://github.com/brocaar/chirpstack-udp-bridge/blob/master/LICENSE).

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: "2"
22
services:
3-
chirpstack-udp-bridge:
3+
chirpstack-udp-forwarder:
44
build:
55
context: .
66
dockerfile: Dockerfile-devel
77
volumes:
8-
- ./:/chirpstack-udp-bridge
8+
- ./:/chirpstack-udp-forwarder

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use serde::Deserialize;
55
pub const VERSION: &'static str = env!("CARGO_PKG_VERSION");
66

77
#[derive(Deserialize, Default)]
8-
pub struct UDPBridge {
8+
pub struct UdpForwarder {
99
pub log_level: String,
1010
#[serde(default)]
1111
pub log_to_syslog: bool,
@@ -28,7 +28,7 @@ pub struct Concentratord {
2828

2929
#[derive(Deserialize)]
3030
pub struct Configuration {
31-
pub udp_bridge: UDPBridge,
31+
pub udp_forwarder: UdpForwarder,
3232
pub concentratord: Concentratord,
3333
}
3434

src/main.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ mod socket;
2020
mod structs;
2121

2222
fn main() {
23-
let matches = App::new("chirpstack-udp-bridge")
23+
let matches = App::new("chirpstack-udp-forwarder")
2424
.version(config::VERSION)
2525
.author("Orne Brocaar <info@brocaar.com>")
26-
.about("ChirpStack UDP Bridge for Concentratord, compatible with the Semtech UDP protocol")
26+
.about(
27+
"ChirpStack UDP Forwarder for Concentratord, compatible with the Semtech UDP protocol",
28+
)
2729
.arg(
2830
Arg::with_name("config")
2931
.short('c')
@@ -39,19 +41,19 @@ fn main() {
3941
let config_files = matches.values_of_lossy("config").unwrap_or(vec![]);
4042
let config = config::Configuration::get(config_files).expect("read configuration error");
4143
let log_level =
42-
log::Level::from_str(&config.udp_bridge.log_level).expect("parse log_level error");
44+
log::Level::from_str(&config.udp_forwarder.log_level).expect("parse log_level error");
4345

4446
logging::setup(
45-
&"chirpstack-udp-bridge",
47+
&"chirpstack-udp-forwarder",
4648
log_level,
47-
config.udp_bridge.log_to_syslog,
49+
config.udp_forwarder.log_to_syslog,
4850
)
4951
.expect("setup logger error");
5052

5153
info!(
52-
"Starting ChirpStack UDP Bridge (version: {}, docs: {})",
54+
"Starting ChirpStack UDP Forwarder (version: {}, docs: {})",
5355
config::VERSION,
54-
"https://github.com/brocaar/chirpstack-udp-bridge",
56+
"https://github.com/chirpstack/chirpstack-udp-forwarder",
5557
);
5658

5759
// read gateway id.
@@ -67,7 +69,7 @@ fn main() {
6769
let mut threads: Vec<thread::JoinHandle<()>> = vec![];
6870

6971
// servers
70-
for server in config.udp_bridge.servers {
72+
for server in config.udp_forwarder.servers {
7173
threads.push(thread::spawn({
7274
let gateway_id = gateway_id.clone();
7375
let event_url = config.concentratord.event_url.clone();
@@ -78,9 +80,9 @@ fn main() {
7880
}
7981

8082
// metrics
81-
if config.udp_bridge.metrics_bind != "" {
83+
if config.udp_forwarder.metrics_bind != "" {
8284
threads.push(thread::spawn({
83-
let bind = config.udp_bridge.metrics_bind.clone();
85+
let bind = config.udp_forwarder.metrics_bind.clone();
8486
move || metrics::start(bind)
8587
}));
8688
}

0 commit comments

Comments
 (0)