Skip to content

Commit 889070a

Browse files
committed
Saving work on commsdsl2wireshark infrastructure.
1 parent 9175993 commit 889070a

33 files changed

Lines changed: 1255 additions & 10 deletions

app/commsdsl2wireshark/src/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
set (src
22
Wireshark.cpp
3+
WiresharkBitfieldField.cpp
4+
WiresharkBundleField.cpp
5+
WiresharkDataField.cpp
6+
WiresharkEnumField.cpp
7+
WiresharkField.cpp
8+
WiresharkFloatField.cpp
39
WiresharkFrame.cpp
410
WiresharkGenerator.cpp
11+
WiresharkIntField.cpp
12+
WiresharkListField.cpp
513
WiresharkNamespace.cpp
14+
WiresharkOptionalField.cpp
615
WiresharkProgramOptions.cpp
16+
WiresharkRefField.cpp
717
WiresharkSchema.cpp
18+
WiresharkSetField.cpp
19+
WiresharkStringField.cpp
20+
WiresharkVariantField.cpp
821
main.cpp
922
)
1023

app/commsdsl2wireshark/src/Wireshark.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ std::string Wireshark::wiresharkDissectFuncInternal() const
135135
;
136136

137137
bool bodyReplaced = false;
138-
auto replacePath = m_wiresharkGenerator.wiresharkInputRelPathFor("dissector") + strings::genReplaceFileSuffixStr();
138+
auto replacePath = m_wiresharkGenerator.wiresharkInputRelPathFor(wiresharkProtocolObjName(m_wiresharkGenerator) + ".dissector") + strings::genReplaceFileSuffixStr();
139139
auto replaceCode = m_wiresharkGenerator.genReadCodeInjectCode(replacePath, "Replace body", &bodyReplaced);
140140

141141
util::GenReplacementMap repl = {
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// Copyright 2026 - 2026 (C). Alex Robenko. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
#include "WiresharkBitfieldField.h"
17+
18+
#include "WiresharkGenerator.h"
19+
20+
namespace commsdsl2wireshark
21+
{
22+
23+
WiresharkBitfieldField::WiresharkBitfieldField(WiresharkGenerator& generator, ParseField parseObj, GenElem* parent) :
24+
GenBase(generator, parseObj, parent),
25+
WiresharkBase(static_cast<GenBase&>(*this))
26+
{
27+
}
28+
29+
} // namespace commsdsl2wireshark
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// Copyright 2026 - 2026 (C). Alex Robenko. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
#pragma once
17+
18+
#include "WiresharkField.h"
19+
20+
#include "commsdsl/gen/GenBitfieldField.h"
21+
22+
namespace commsdsl2wireshark
23+
{
24+
25+
class WiresharkGenerator;
26+
class WiresharkBitfieldField final : public commsdsl::gen::GenBitfieldField, public WiresharkField
27+
{
28+
using GenBase = commsdsl::gen::GenBitfieldField;
29+
using WiresharkBase = WiresharkField;
30+
31+
public:
32+
using ParseField = commsdsl::parse::ParseField;
33+
using GenElem = commsdsl::gen::GenElem;
34+
35+
WiresharkBitfieldField(WiresharkGenerator& generator, ParseField parseObj, GenElem* parent);
36+
};
37+
38+
} // namespace commsdsl2wireshark
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// Copyright 2026 - 2026 (C). Alex Robenko. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
#include "WiresharkBundleField.h"
17+
18+
#include "WiresharkGenerator.h"
19+
20+
namespace commsdsl2wireshark
21+
{
22+
23+
WiresharkBundleField::WiresharkBundleField(WiresharkGenerator& generator, ParseField parseObj, GenElem* parent) :
24+
GenBase(generator, parseObj, parent),
25+
WiresharkBase(static_cast<GenBase&>(*this))
26+
{
27+
}
28+
29+
} // namespace commsdsl2wireshark
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// Copyright 2026 - 2026 (C). Alex Robenko. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
#pragma once
17+
18+
#include "WiresharkField.h"
19+
20+
#include "commsdsl/gen/GenBundleField.h"
21+
22+
namespace commsdsl2wireshark
23+
{
24+
25+
class WiresharkGenerator;
26+
class WiresharkBundleField final : public commsdsl::gen::GenBundleField, public WiresharkField
27+
{
28+
using GenBase = commsdsl::gen::GenBundleField;
29+
using WiresharkBase = WiresharkField;
30+
31+
public:
32+
using ParseField = commsdsl::parse::ParseField;
33+
using GenElem = commsdsl::gen::GenElem;
34+
35+
WiresharkBundleField(WiresharkGenerator& generator, ParseField parseObj, GenElem* parent);
36+
};
37+
38+
} // namespace commsdsl2wireshark
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// Copyright 2026 - 2026 (C). Alex Robenko. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
#include "WiresharkDataField.h"
17+
18+
#include "WiresharkGenerator.h"
19+
20+
namespace commsdsl2wireshark
21+
{
22+
23+
WiresharkDataField::WiresharkDataField(WiresharkGenerator& generator, ParseField parseObj, GenElem* parent) :
24+
GenBase(generator, parseObj, parent),
25+
WiresharkBase(static_cast<GenBase&>(*this))
26+
{
27+
}
28+
29+
} // namespace commsdsl2wireshark
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// Copyright 2026 - 2026 (C). Alex Robenko. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
#pragma once
17+
18+
#include "WiresharkField.h"
19+
20+
#include "commsdsl/gen/GenDataField.h"
21+
22+
namespace commsdsl2wireshark
23+
{
24+
25+
class WiresharkGenerator;
26+
class WiresharkDataField final : public commsdsl::gen::GenDataField, public WiresharkField
27+
{
28+
using GenBase = commsdsl::gen::GenDataField;
29+
using WiresharkBase = WiresharkField;
30+
31+
public:
32+
using ParseField = commsdsl::parse::ParseField;
33+
using GenElem = commsdsl::gen::GenElem;
34+
35+
WiresharkDataField(WiresharkGenerator& generator, ParseField parseObj, GenElem* parent);
36+
};
37+
38+
} // namespace commsdsl2wireshark
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// Copyright 2026 - 2026 (C). Alex Robenko. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
#include "WiresharkEnumField.h"
17+
18+
#include "WiresharkGenerator.h"
19+
20+
namespace commsdsl2wireshark
21+
{
22+
23+
WiresharkEnumField::WiresharkEnumField(WiresharkGenerator& generator, ParseField parseObj, GenElem* parent) :
24+
GenBase(generator, parseObj, parent),
25+
WiresharkBase(static_cast<GenBase&>(*this))
26+
{
27+
}
28+
29+
} // namespace commsdsl2wireshark
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// Copyright 2026 - 2026 (C). Alex Robenko. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
#pragma once
17+
18+
#include "WiresharkField.h"
19+
20+
#include "commsdsl/gen/GenEnumField.h"
21+
22+
namespace commsdsl2wireshark
23+
{
24+
25+
class WiresharkGenerator;
26+
class WiresharkEnumField final : public commsdsl::gen::GenEnumField, public WiresharkField
27+
{
28+
using GenBase = commsdsl::gen::GenEnumField;
29+
using WiresharkBase = WiresharkField;
30+
31+
public:
32+
using ParseField = commsdsl::parse::ParseField;
33+
using GenElem = commsdsl::gen::GenElem;
34+
35+
WiresharkEnumField(WiresharkGenerator& generator, ParseField parseObj, GenElem* parent);
36+
};
37+
38+
} // namespace commsdsl2wireshark

0 commit comments

Comments
 (0)