Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple Lua versions #17

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,28 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Dependencies
run: choco install wireshark
- name: Install Wireshark 4.2.6
run: |
choco install wireshark --version=4.2.6 -y
- name: Build v2gLibs for Wireshark 4.2.6
shell: cmd
working-directory: ./V2G_Libraries
run: |
build_for_ws.bat "C:\Program Files\Wireshark"
- name: Install Wireshark latest
run: |
choco uninstall wireshark -y
choco install wireshark -y
- name: Build v2gLibs for Wireshark latest
shell: cmd
working-directory: ./V2G_Libraries
run: |
build_for_ws.bat "C:\Program Files\Wireshark"
- name: Build All
- name: Build Installer
run: Build_Installer.bat
shell: cmd
working-directory: ./Installer
Expand All @@ -29,8 +47,7 @@ jobs:
- name: Prepare Artifact Directory
run: |
mkdir artifact_dir
cp ./V2G_Libraries/CertificateInfos/bin/* ./artifact_dir/
cp ./V2G_Libraries/V2GDecoder/bin/* ./artifact_dir/
cp ./V2G_Libraries/v2gLib/bin/* ./artifact_dir/
mkdir artifact_dir/plugins
cp ./Wireshark/plugins/* ./artifact_dir/plugins/
cp ./LICENSE ./artifact_dir/dsV2Gshark_LICENSE.txt
Expand All @@ -56,8 +73,7 @@ jobs:
- name: Prepare Artifact Directory
run: |
mkdir artifact_dir
cp ./V2G_Libraries/CertificateInfos/bin/* ./artifact_dir/
cp ./V2G_Libraries/V2GDecoder/bin/* ./artifact_dir/
cp ./V2G_Libraries/v2gLib/bin/* ./artifact_dir/
mkdir artifact_dir/plugins
cp ./Wireshark/plugins/* ./artifact_dir/plugins/
cp ./LICENSE ./artifact_dir/dsV2Gshark_LICENSE.txt
Expand Down
39 changes: 19 additions & 20 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"tasks": [
{
"label": "Build All",
"dependsOn": ["Build v2gLib (single)", "Build Installer"],
"dependsOrder": "sequence"
},
{
"label": "Build Installer",
"detail": "",
"type": "shell",
"command": "./Build_Installer.bat",
Expand All @@ -12,6 +17,17 @@
"kind": "build",
},
},
{
"label": "Build v2gLib (single)",
"detail": "",
"type": "shell",
"command": "./build_for_ws.bat \"C:\\Program Files\\Wireshark\"",
"problemMatcher": [],
"options": {
"cwd": "V2G_Libraries",
"kind": "build",
},
},
{
"label": "Update Version (interactive)",
"detail": "",
Expand All @@ -34,7 +50,7 @@
},
},
{
"label": "WSL: Build Linux",
"label": "WSL: Build for Linux",
"detail": "",
"type": "shell",
"command": "wsl sh ./build_all_linux.sh",
Expand All @@ -45,30 +61,13 @@
},
},
{
"label": "Clean All",
"dependsOn": ["Clean Decoder", "Clean CertInfos"],
"group": {
"isDefault": true
}
},
{
"label": "Clean Decoder",
"detail": "",
"type": "shell",
"command": "make",
"args": ["clean"],
"options": {
"cwd": "V2G_Libraries/V2GDecoder",
},
},
{
"label": "Clean CertInfos",
"label": "Clean v2gLib",
"detail": "",
"type": "shell",
"command": "make",
"args": ["clean"],
"options": {
"cwd": "V2G_Libraries/CertificateInfos",
"cwd": "V2G_Libraries/v2gLib",
},
},
{
Expand Down
11 changes: 4 additions & 7 deletions Installer/Build_Installer.bat
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
:: Script to build DLLs and create Installer. Should be run in MinGW Bash (e.g. git-bash)
:: Script to create the installer. Make sure the v2gLib is built before.
:: Should be run in MinGW Bash (e.g. git-bash)
:: note: Inno Setup must be installed and added to Path

@echo off
:: create DLLs
:: copy v2gLib binaries
cd "%~dp0../V2G_Libraries/"
call build_all_win.bat
if %ERRORLEVEL% NEQ 0 goto :failed
copy "CertificateInfos\bin\v2gX509CertInfos.dll" "%~dp0..\Wireshark\"
if %ERRORLEVEL% NEQ 0 goto :failed
copy "V2GDecoder\bin\v2gLuaDecoder.dll" "%~dp0..\Wireshark\"
copy "v2gLib\bin\v2gLib*.dll" "%~dp0..\Wireshark\"
if %ERRORLEVEL% NEQ 0 goto :failed

:: prepare installer readme
Expand Down
4 changes: 3 additions & 1 deletion Installer/InstallerScript.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// DO NOT CHANGE VERSION HERE! Run update_version.bat
#define AppVer "1.4.1"
#define AppVer "1.4.2"
#define AppId "dsV2Gshark"

[Setup]
Expand Down Expand Up @@ -63,6 +63,8 @@ Source: "..\OSSAcknowledgements.txt"; DestDir: "{app}"; DestName: "dsV2Gshark_OS
Source: "dsV2Gshark_README.txt"; DestDir: "{app}"; DestName: "dsV2Gshark_README.txt"; Flags: ignoreversion;

[InstallDelete]
Type: filesandordirs; Name: "{app}\v2gLuaDecoder.dll"
Type: filesandordirs; Name: "{app}\v2gX509CertInfos.dll"
Type: filesandordirs; Name: "{app}\luaV2Gdecoder.dll"
Type: filesandordirs; Name: "{app}\X509CertInfos.dll"
Type: filesandordirs; Name: "{app}\plugins\v2gmsg_generic.lua"
Expand Down
8 changes: 4 additions & 4 deletions OSSAcknowledgements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ cbExiGen

The license text of the 'Apache License Version 2.0' can be found in APPENDIX A.

Wireshark 4.2.5
Wireshark 4.4.0
Copyright:
Copyright 1998-2024 Gerald Combs <gerald@wireshark.org> and contributors
Repository: https://gitlab.com/wireshark/wireshark
Expand Down Expand Up @@ -186,7 +186,7 @@ The license text of the 'GNU LESSER GENERAL PUBLIC LICENSE v2.1' can be found in
Components
==========

Libxml2 2.11.5
Libxml2 2.11.7
Copyright:
Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
Repository: https://github.com/GNOME/libxml2
Expand Down Expand Up @@ -219,7 +219,7 @@ THE SOFTWARE.
Components
==========

zlib 1.3.0
zlib 1.3.1
Copyright:
Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler
URL: https://www.zlib.net/
Expand All @@ -228,7 +228,7 @@ zlib 1.3.0
# ====================================================================
# libxml2 License
# --------------------------------------------------------------------
Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
[![Release](https://img.shields.io/github/v/release/dspace-group/dsV2Gshark?label=release)](https://github.com/dspace-group/dsV2Gshark/releases)
[![dSPACE](https://img.shields.io/badge/-OpenSource%20powered%20by%20dSPACE-blue)](https://www.dspace.com/)

## ❗Wireshark 4.4+ requires dsV2Gshark 1.4.2 or higher❗

## Overview
This Wireshark plugin allows to analyze and decode packets between electric vehicles (EV) and charging stations (EVSE), also known as V2G messages.

Expand Down Expand Up @@ -65,13 +67,6 @@ Click on a packet in the graph to inspect it in the Wireshark main window. Press
- No installer, see [Installation Notes](#installation-notes). Make sure you have read permissions for all files.
- Filter buttons and color filters must be added manually
- I/O graph must be configured manually
- The libraries you find in [GitHub Releases](https://github.com/dspace-group/dsV2Gshark/) are built for Lua 5.2. However, some Linux distributions (e.g. Fedora 39 and below) still use Lua 5.1. In that case, you will need to built the libaries yourself using the following commands:
```
export LUAFLAGS="-I$(pkg-config --variable=includedir lua51)"
cd V2G_Libraries
./build_all_linux.sh
```
The built libraries can then be found in `V2G_Libraries\CertificateInfos\bin` and `V2G_Libraries\V2GDecoder\bin`.

## Support
- If you encounter any problems, feel free to open an issue or contact us at support@dSPACE.de
Expand All @@ -80,7 +75,7 @@ Click on a packet in the graph to inspect it in the Wireshark main window. Press
## Further notes
- When sniffing V2G communication, lost packets may occur, which cause corrupted TCP/TLS sessions. In that case, it may help to activate the option to ignore Message Authentication Code (MAC) check failures in the Wireshark TLS protocol settings.
This option can be found under Wireshark Preferences - Protocols - TLS
- This plugin was built and tested with Wireshark 4.2.5
- This plugin was built and tested with Wireshark 4.4.0 and 4.2.6
- The EXI decoding is based on [cbExiGen](https://github.com/EVerest/cbexigen)


Expand Down
4 changes: 0 additions & 4 deletions V2G_Libraries/CertificateInfos/.gitignore

This file was deleted.

28 changes: 0 additions & 28 deletions V2G_Libraries/CertificateInfos/main.rc

This file was deleted.

42 changes: 0 additions & 42 deletions V2G_Libraries/CertificateInfos/makefile

This file was deleted.

39 changes: 0 additions & 39 deletions V2G_Libraries/CertificateInfos/makefile_linux

This file was deleted.

Loading