elear / mud

Manufacturer Usage Descriptions
Other
9 stars 8 forks source link

muddy-api #15

Closed Daniel-W-Innes closed 5 years ago

Daniel-W-Innes commented 5 years ago

Overview

Quick flask API for muddy.

The API takes a JSON request from the user and maps it to the library. Also fixed windows compatibility of the repo by renaming one file which was using a windows reserved filename, please see windows filename in conventions

Testing

The project can be tested either using the flash default web server or unicorn from the docker file. It should be noted that I have not tested the docker file recently as I do not have docker on my home computer.

Known bugs

There's a known bug with protocol direction versus initiation direction which, I do not know the solution for if someone with experience in Mud files can figure it out that would be massively appreciated. I know this bug is technically with muddy, not the API just figured I should mention it here.

elear commented 5 years ago

Hi Daniel

Thanks very much for your work and the PR. Can you describe the known bug maybe I can provide some guidance? Should I get this going on /beta and see how we do?

elear commented 5 years ago

Ok, I've merged this into the beta branch and will start looking at building out some glue to test with.

elear commented 5 years ago

ps: thank you very much Daniel.

Daniel-W-Innes commented 5 years ago

Eliot,

Sorry, I didn't manage to get back to you earlier did you have any luck on the bug? There are 2 parameters in the PHP "dirinit" and "pdirect", which are direction_initiated and protocol_direction respectively in muddy. Due to the different build order in muddy I am having trouble determining how these parameters should affect the final data and how to translate them into python. If you could possibly describe them then I may be able to fix the bug.

Thanks, Daniel

elear commented 5 years ago

Hi Daniel,

There are two forms of direction in a MUD file. One is based on whether we are going to or from the device in terms packets, and the other is based on who has initiated the communication; the device or the remote peer. dirinit refers to the latter. If memory serves, pdirect serves as packet direction.

Best regards,

Eliot