Skip to content

Commit

Permalink
Merge pull request elastic#338 from kjell-hedstrom/LuaProtoScript
Browse files Browse the repository at this point in the history
Added LuaDefined proto for Lua import/export/load
  • Loading branch information
KjellKod committed May 26, 2015
2 parents 1cef1b3 + 615d9c8 commit 184f38c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions protofiles/CommandRequest.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ message CommandRequest {
PCAP_RECONSTRUCTION = 10;
LICENSE = 11;
MACHINE_ID = 12;
LUA_SAVE = 13;
}
required CommandType type = 1;
optional string stringArgOne = 2;
Expand Down
37 changes: 37 additions & 0 deletions protofiles/LuaDefinedRule.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package protoMsg;

option java_package = "com.logrhythm.nm.message";
option java_outer_classname = "LuaRulesMsg";


message LuaDefinedRule {
enum LuaType {
CUSTOM = 0;
SYSTEM = 1;
}

enum LuaExecution {
PACKET_RULE = 0;
FLOW_RULE = 1;
}

required LuaType type = 1;
required string code =2;

optional string name = 3;
optional bool enabled = 4;
optional string description = 5;
optional string author = 6;
optional string uuid = 7;
optional uint64 last_modified_date =8;
}



message LuaRules {
message LuaSerializedRule {
optional string uuid = 1;
required string rule = 2;
}
repeated LuaSerializedRule rules =1;
}
3 changes: 3 additions & 0 deletions scripts/buildProtoFiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ cd "$cppSrcDir"
"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libprocess "$protoFileDir"/ProcessRequest.proto
"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libprocess "$protoFileDir"/ProcessReply.proto
"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libcommand "$protoFileDir"/DriveInfo.proto
"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libcommand "$protoFileDir"/LuaDefinedRule.proto
"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libcommand "$protoFileDir"/ConfigDefaults.proto
"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libcommand "$protoFileDir"/ConfigDefaultsRequest.proto
"$protoc" -I="$protoFileDir":$thirdPartyDir:/usr/include:$DISTDIR/protobuf/include --cpp_out=libfork "$protoFileDir"/ForkerReply.proto
Expand Down Expand Up @@ -109,6 +110,8 @@ mv libcommand/CommandReply.pb.cc libcommand/CommandReply.pb.cpp
mv libprocess/ProcessRequest.pb.cc libprocess/ProcessRequest.pb.cpp
mv libprocess/ProcessReply.pb.cc libprocess/ProcessReply.pb.cpp
mv libcommand/DriveInfo.pb.cc libcommand/DriveInfo.pb.cpp
mv libcommand/LuaDefinedRule.pb.cc libcommand/LuaDefinedRule.pb.cpp

mv libcommand/ConfigDefaults.pb.cc libcommand/ConfigDefaults.pb.cpp
mv libcommand/ConfigDefaultsRequest.pb.cc libcommand/ConfigDefaultsRequest.pb.cpp
mv libfork/ForkerReply.pb.cc libfork/ForkerReply.pb.cpp
Expand Down

0 comments on commit 184f38c

Please sign in to comment.