functions for manipulating packets

This commit is contained in:
Vinzenz Schroeter 2025-04-12 12:05:19 +02:00
parent 1a58294f88
commit d215f7199e
9 changed files with 81 additions and 37 deletions

View file

@ -16,7 +16,12 @@ int main(void) {
if (command == NULL)
return 1;
sp_connection_send_command(connection, command);
Packet *packet = sp_packet_from_command(command);
Header *header = sp_packet_get_header(packet);
printf("[%d, %d, %d, %d, %d]\n", header->command_code, header->a, header->b, header->c, header->d);
sp_connection_send_packet(connection, packet);
sp_connection_free(connection);
return 0;