diff --git a/Pipfile b/Pipfile index 4582f9a..6960961 100644 --- a/Pipfile +++ b/Pipfile @@ -12,7 +12,7 @@ aiohttp = ">=3.8.1" aiohttp-jinja2 = ">=1.5" Jinja2 = ">=3.0.3" Pillow = ">=8.4.0" -python-ndn = {git = "https://github.com/named-data/python-ndn"} +python-ndn = ">=0.3" [requires] python_version = "3.10" diff --git a/Pipfile.lock b/Pipfile.lock index c0a2fa2..4570e71 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "b088eb1bf37ddd92952995e75c016fc2f8ec6b86768cf75744478d2e550654ce" + "sha256": "034bc51a9d5c3111ed0ca6122ef55916c3f0509f24064e7ae8bf43deffa98cc1" }, "pipfile-spec": 6, "requires": { @@ -147,7 +147,7 @@ "sha256:e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0", "sha256:f7af805c321bfa1ce6714c51f254e0d5bb5e5834039bc17db7ebe3a4cec9492b" ], - "markers": "python_full_version >= '3.5.0'", + "markers": "python_version >= '3.5'", "version": "==2.0.7" }, "frozenlist": { @@ -233,7 +233,7 @@ "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" ], - "markers": "python_full_version >= '3.5.0'", + "markers": "python_version >= '3.5'", "version": "==3.3" }, "jinja2": { @@ -540,8 +540,12 @@ "version": "==4.3.0" }, "python-ndn": { - "git": "https://github.com/named-data/python-ndn", - "ref": "511eefc87b3265d0f32a76146659fa1cbd8bbf2a" + "hashes": [ + "sha256:194bcb9de98c16f8c8bd0e6fa5001f3830dbc7d88f5d821b771653cec12aa13b", + "sha256:8277aa4ff4bed11abfc1e648ea3f82035dfe6ff70171cfe85cacbbc3ffc36e4c" + ], + "index": "pypi", + "version": "==0.3" }, "python-socketio": { "hashes": [ diff --git a/ndncc/server.py b/ndncc/server.py index c8cf0ea..3e395ce 100644 --- a/ndncc/server.py +++ b/ndncc/server.py @@ -148,9 +148,7 @@ async def issue_command_interest(self, cmd): except (InterestCanceled, InterestTimeout, InterestNack, ValidationFailure, NetworkError): logging.error(f'Command failed') return None - ret = parse_response(data) - ret['status_text'] = ret['status_text'].decode() - return ret + return parse_response(data) async def add_face(self, uri): # It's not easy to distinguish udp4://127.0.0.1 and udp4://spurs.cs.ucla.edu diff --git a/templates/routing.html b/templates/routing.html index 5ae019a..1631385 100644 --- a/templates/routing.html +++ b/templates/routing.html @@ -32,6 +32,22 @@

{{ title }}

{{ route_table('Forwarding Table (FIB)', fib_list, 'next_hop_records') }}
{{ route_table('Routing Table (RIB)', rib_list, 'routes') }}
+
+

+ + +

+

+ + +

+

+ +

+
+ {% if st_code %} +

{{ st_code }} {{ st_text }}

+ {% endif %}
{% if fib_routes|length > 0 %} @@ -66,6 +82,7 @@

RIB Entry for {{ request_name }}

Origin Cost Flags + Delete @@ -77,6 +94,13 @@

RIB Entry for {{ request_name }}

{{ route['origin']|e }} {{ route['cost']|e }} {{ route['flags']|e }} + +
+ + + +
+ {% endfor %}