summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Gustafsson <robg@student.chalmers.se>2017-09-28 14:25:01 +0200
committerAndreas Lindhé <andreas@lindhe.io>2017-10-09 12:14:35 +0200
commit209a57957267823302cd8aedf47de406edbc6488 (patch)
tree892312be721ed72ede629fa66bff889b426013ec
parent2f5b120d90ce98676447df7fbf27397029d84ebd (diff)
downloadmidbro-209a57957267823302cd8aedf47de406edbc6488.tar.gz
midbro-209a57957267823302cd8aedf47de406edbc6488.tar.bz2
Some renaming
-rw-r--r--broccoli/Makefile (renamed from Makefile)12
-rw-r--r--broccoli/broevent.c (renamed from pasad.c)4
-rw-r--r--broccoli/fifoqueue.c (renamed from fifoqueue.c)0
-rw-r--r--broccoli/modbus.bro (renamed from pasad_bro.bro)2
4 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/broccoli/Makefile
index 8b304a1..d895274 100644
--- a/Makefile
+++ b/broccoli/Makefile
@@ -2,15 +2,15 @@ CC=gcc
CFLAGS = -c -Wall -I/usr/local/include -I/usr/local/include -DBROCCOLI
LDFLAGS = -L/usr/local/lib -lbroccoli
-all: pasad
+all: broevent
-pasad: pasad.o fifoqueue.o
- $(CC) pasad.o fifoqueue.o -o pasad $(LDFLAGS)
+broevent: broevent.o fifoqueue.o
+ $(CC) broevent.o fifoqueue.o -o broevent $(LDFLAGS)
-pasad.o: pasad.c
- $(CC) $(CFLAGS) pasad.c
+broevent.o: broevent.c
+ $(CC) $(CFLAGS) broevent.c
fifoqueue.o: fifoqueue.c
$(CC) -c -Wall fifoqueue.c
clean:
- rm *.o pasad
+ rm *.o broevent
diff --git a/pasad.c b/broccoli/broevent.c
index 537a804..a2b7a28 100644
--- a/pasad.c
+++ b/broccoli/broevent.c
@@ -7,7 +7,7 @@ char *host_default = "127.0.0.1";
char *port_default = "47760";
static void
-bro_pasad_response(BroConn *conn, void *data, uint64* registers, uint64* uid)
+bro_response(BroConn *conn, void *data, uint64* registers, uint64* uid)
{
printf("Received value %"PRIu64" from uid=%"PRIu64"\n",*registers,*uid);
@@ -33,7 +33,7 @@ bro_event_listener()
bro_debug_calltrace = 0;
bro_debug_messages = 0;
- bro_event_registry_add(bc, "response",(BroEventFunc) bro_pasad_response, NULL);
+ bro_event_registry_add(bc, "response",(BroEventFunc) bro_response, NULL);
if (! bro_conn_connect(bc))
{
diff --git a/fifoqueue.c b/broccoli/fifoqueue.c
index 56b1dda..56b1dda 100644
--- a/fifoqueue.c
+++ b/broccoli/fifoqueue.c
diff --git a/pasad_bro.bro b/broccoli/modbus.bro
index c324856..a2caed9 100644
--- a/pasad_bro.bro
+++ b/broccoli/modbus.bro
@@ -8,7 +8,7 @@ redef Communication::listen_ssl = F;
global response: event(register: count, uid: count);
redef Communication::nodes += {
- ["pasad"] = [$host = 127.0.0.1, $events = /pasad/, $connect=F, $ssl=F]
+ ["broevent"] = [$host = 127.0.0.1, $events = /broevent/, $connect=F, $ssl=F]
};
event modbus_read_holding_registers_request(c: connection, headers: ModbusHeaders, start_adress: count, quantity: count)