-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from GlobalNOC/1.0.0-dev
1.0.0 dev
- Loading branch information
Showing
5 changed files
with
58 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@load base/protocols/ftp | ||
@load base/utils/exec | ||
|
||
#@load base/protocols/ftp/gridftp | ||
#module GridFTP; | ||
|
||
function signalSciPass(c: connection) | ||
{ | ||
local anagram : Exec::Command; | ||
|
||
local prog = fmt("curl -X PUT -d '{\"nw_dst\":\"%s/32\", \"nw_src\":\"%s/32\", \"tp_src\":\"%d\", \"tp_dst\":\"%d\"}' http://scipass-controller:8080/scipass/flows/good_flow", | ||
c$id$resp_h, c$id$orig_h,c$id$orig_p, c$id$resp_p); | ||
#print prog; | ||
local param = ""; | ||
anagram = [$cmd = prog, $stdin = param]; | ||
when ( local result = Exec::run(anagram)) | ||
{ | ||
if ( result$exit_code != 0 ) | ||
{ | ||
return; | ||
} | ||
} | ||
return; | ||
} | ||
|
||
event bro_init() | ||
{ | ||
print "BRO Starting"; | ||
} | ||
|
||
|
||
event ftp_request(c: connection, command: string, arg: string) | ||
{ | ||
#print fmt("FTP REQUEST!! command: %s args: %s", command, arg); | ||
|
||
} | ||
|
||
event ftp_reply(c: connection, code: count, msg: string, cont_resp: bool) | ||
{ | ||
#print fmt("FTP REPLY!! code: %d, msg: %s", code, msg); | ||
} | ||
|
||
|
||
|
||
event file_over_new_connection(f: fa_file, c: connection, is_orig: bool) | ||
{ | ||
print "FILE TRANSFER STARTED!"; | ||
signalSciPass(c); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ rm -rf $RPM_BUILD_ROOT | |
%{__install} -d -p %{buildroot}/etc/init.d | ||
%{__install} python/*.py %{buildroot}/%{python_sitelib}/SciPass/ | ||
%{__install} etc/SciPass.xml %{buildroot}/etc/SciPass/ | ||
%{__install} etc/ryu.conf %{buildroot}/etc/SciPass/ | ||
%{__install} etc/scipass-init %{buildroot}/etc/init.d/scipass | ||
%clean | ||
rm -rf $RPM_BUILD_ROOT | ||
|
@@ -33,6 +34,7 @@ rm -rf $RPM_BUILD_ROOT | |
%defattr(-,root,root,-) | ||
/etc/init.d/scipass | ||
/etc/SciPass/SciPass.xml | ||
/etc/SciPass/ryu.conf | ||
%{python_sitelib}/SciPass/* | ||
|
||
%doc | ||
|
@@ -41,4 +43,3 @@ rm -rf $RPM_BUILD_ROOT | |
%changelog | ||
* Fri Jul 25 2014 aragusa <[email protected]> - | ||
- Initial build. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters