receiver.sh and getdcmtags update for SenderIP filtering possibility #16
tblock79
started this conversation in
Other Information
Replies: 1 comment
-
Note that there have been recent modifications to the getdcmtags module. Therefore, the macro INSERTTAG does not exist anymore, but it shouldn't be difficult to adjust above concept accordingly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Kindly shared by @alipairon
In case anyone is looking for a method to incorporate an IP filtering possibility into the 'Rules', it's not overly complicated.
It can be achieved with the following steps:
Update and recompile
getdcmtags
by incorporating the following changes:In the static section, add:
static OFString helperSenderIP = "";
In the
INSERTTAG
section, add:INSERTTAG("SenderIP", helperSenderIP, "127.0.0.1");
After the section where other helpers are declared, add:
helperSenderIP = OFString(argv[6]);
Modify the
storescp
start string inreceiver.sh
as follows:storescp --fork --promiscuous $transfer_syntax_option -od "$incoming" -dhl +uf -xcr "$binary $incoming/#f #a #c$bookkeeper$bookkeeper_api_key #r" $port
By adding
-dhl
, you instructstorescp
not to resolve DNS names, and by appending"#r
at the end of thegetdcmtags
launch string,storescp
will supply the sender IP address.Don't forget to replace the existing
main.cpp
file ofgetdcmtags
with the newly edited one. This step is essential for the new tag to be included in the list of available tags on the 'Rules' page.Hope this helps somebody.
Beta Was this translation helpful? Give feedback.
All reactions