{"id":16389338,"url":"https://github.com/marcelog/mdm","last_synced_at":"2025-05-06T00:12:45.759Z","repository":{"id":1383675,"uuid":"1338446","full_name":"marcelog/MDM","owner":"marcelog","description":"Marcelog Device Manager is a set of libraries and a multithreaded daemon written in plain ansi C that runs under linux and freebsd, and allows clients to control devices like DSLAM Alcatel, ZTE, and HUAWEI. it supports ssh2, telnet, raw, and serial connections. Uses libssh2 1.2.5+ and libtelnet","archived":false,"fork":false,"pushed_at":"2012-07-18T16:44:52.000Z","size":469,"stargazers_count":5,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-06T00:12:40.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcelog.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-07T16:42:34.000Z","updated_at":"2022-07-15T22:12:35.000Z","dependencies_parsed_at":"2022-07-29T12:38:59.396Z","dependency_job_id":null,"html_url":"https://github.com/marcelog/MDM","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FMDM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FMDM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FMDM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FMDM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelog","download_url":"https://codeload.github.com/marcelog/MDM/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252596427,"owners_count":21773846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T04:32:25.449Z","updated_at":"2025-05-06T00:12:45.742Z","avatar_url":"https://github.com/marcelog.png","language":"C","readme":"/*!\n * You can get the releases at the CI server: http://ci.marcelog.name:8080/view/C%20C++/\n * \\mainpage \n * \\page README README\n *\\n\n *\\n\n * Here's how it works, top-bottom:\\n\n *\\n\n * Using a MDMDevice client, like MDMDevice.php, from your own code\\n\n * call MDMDevice constructor, getting a instance of an MDMDevice\\n\n * class. This will initialize all the data needed (see example.php).\\n\n *\\n \n * When you want to execute a command in a device, you have to call the exec()\\n\n * method of that object. Remember to use constants (encapsulated in the same\\n\n * MDMDevice client you've just instantiated) like: \\n\n * MDM_DEVICE_DSLAM_ALCATEL_73xx, MDM_CONNECTION_TELNET, \\n\n * MDM_DSLAM_ALCATEL_73xx_CMD_GET_IP, etc to identify the device type, the\\n\n * connection type, etc. Do not hardcode anything!\\n\n *\\n\n * The exec method will open a socket and try to connect to the MDM server. It\\n\n * will honor parameters like connection timeout and receive timeout so it can\\n\n * abort the connection on any of these timeouts values. (Remember, these\\n\n * timeouts apply only to the connection from your code to the MDM server,\\n\n * timeouts regarding the connection from the MDM server to the devices\\n\n * are embedded in the request itself and go as arguments to the exec method\\n\n * generally). Be *warned* you may need high times for recv_to and or\\n\n * devread_to depending on the device you are interacting with.\\n\n *\\n\n * Once the exec method is connected to the MDM server, it sends a XML request\\n\n * (see mdm_request_example.xml). The server will validate this request\\n\n * against a request schema (see mdm_request.xsd). If the request is \\n\n * sintactically valid, it will proceed to validate the contained data and\\n\n * execute the command requested.\\n\n *\\n\n *\\n WARNING: The server will silently close and drop the connection if the\\n\n * request is invalid or does not have any available childs to handle the\\n\n * connection, etc. If you notice that your connections are dropped by the\\n\n * server, check the server logs.\\n\n *\\n\n * If the command executed successfully, the server will reply with an error\\n\n * code equals to 0. If an error occurred, the error code will not be equals\\n\n * to 0 and an additional response message is generated in the response.\\n\n * The server has several configuration options (see mdm_server_conf.xml and\\n\n * mdm_server_conf.xsd).\\n\n *\\n\n * When the MDMDevice gets the response from server\\n\n * (see mdm_response_example.xml) it will try to validate it against a schema\\n\n * (see mdm_response.xsd) and throw an exception if it doesn't validate.\\n\n *\\n\n * If everything went well, you now have available the methods needed in the\\n\n * MDMDevice you instantiated to access the data requested (i.e: if you\\n\n * asked for a dslam uptime, you have the getDSLAMUptime() method, etc).\\n\n * \\n\n * \\n\n * Here is the basic diagram for mdm layers:\\n\n * \\n\n * \\n\n * example.php\\n\n *      |     \\n\n *      |     \\n\n * MDMDevice.php\\n\n *      |\\n\n *      |\\n\n * IP NETWORK\\n\n *      |\\n\n *      |\\n\n * +---------------------------------------------------------------------------+\\n\n * | User applications, i.e:                                                   |\\n\n * | mdm_server.c                                                              |\\n\n * | mdm_test_driver_telnet.c                                                  |\\n\n * | mdm_test_driver_ssh2.c                                                    |\\n\n * | mdm_test_driver_rawtcp.c                                                  |\\n\n * | mdm_test_driver_serial.c                                                  |\\n\n * | mdm_test_driver_dummy.c                                                   |\\n\n * | mdm_test_device_dslam_alcatel_73xx.c                                      |\\n\n * | mdm_test_device_dslam_zte_8426.c                                          |\\n\n * | mdm_connection_types_list.c                                               |\\n\n * | mdm_device_types_list.c                                                   |\\n\n * +---------------------------------------------------------------------------+\\n\n * | mdm_device.c                                                              |\\n\n * +----------------------------------+----------------------------------------+\\n\n * | device drivers                   | device command parsers                 |\\n\n * | mdm_device_dslam_zte_8426.c      | mdm_parser_dslam_zte_8426.c            |\\n\n * | mdm_device_dslam_alcatel_73xx.c  | mdm_parser_dslam_alcatel_73xx.c        |\\n\n * +----------------------------------+----------------------------------------+\\n\n * | mdm_connection.c                                                          |\\n\n * +---------------------------------------------------------------------------+\\n\n * | connection drivers                                                        |\\n\n * | mdm_driver_telnet.c                                                       |\\n\n * | mdm_driver_ssh2.c                                                         |\\n\n * | mdm_driver_rawtcp.c                                                       |\\n\n * | mdm_driver_rawtcp_server.c                                                |\\n\n * | mdm_driver_serial.c                                                       |\\n\n * | mdm_driver_dummy.c                                                        |\\n\n * +---------------------------------------------------------------------------+\\n\n * Commands executed by mdm_device_exec follow this path:\\n\n * 1.- mdm_device_xxxx_prepare_exec() Will mix command and arguments, and \\n\n * validate both. \\n\n * 2.- mdm_device_xxxx_exec() Will exec the command with arguments.\\n\n * 3.- mdm_device_xxxx_post_exec() Will parse the result, giving back an XML\\n\n * if a parser exists for that command or the raw response from the device.\\n\n */\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelog%2Fmdm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelog%2Fmdm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelog%2Fmdm/lists"}