> On Wed, Apr 10, 2024 at 7:05 PM Lorenzo Bianconi <lorenzo@xxxxxxxxxx> wrote: > > + "requestId":"11235814", > 11235813 to match the default request ID > > + > > +static void usage(void) > > +{ > > + wpa_printf(MSG_ERROR, > > + "%s:\n" > > + "afcd -u<url> [-p<port>][-t<token>][-D<unix-sock dir>][-P<PID file>][-dB]", > > + __func__); > > +} > missing `-d` usage what do you mean? > > + > Also, for setting `Content-Length` I had to use the below script, > should we add this as well > or at least put it in a README? ack, thx. I will fix the afc-reply example. Regards, Lorenzo > > $ cat afc_server_sim.sh > #!/bin/bash > > # Define the JSON content > json_content=$(cat afc-reply.json) > > # Calculate the length of the JSON content > content_length=$(echo "$json_content" | wc -m) > > # Create the HTTP response > http_response="HTTP/1.1 200 OK > Content-Type: application/json > Content-Length: $content_length > > $json_content" > > # Write the HTTP response to a file > echo -e "$http_response" > response.txt > > # Use netcat to listen on a specific port and send the response to any > incoming requests > while true; do nc -l 9999 < response.txt; done > ### END OF SCRIPT## > and then I run `sudo ./afcd -u http://localhost -p 9999 -ddd`
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap