How to send custom messages between routers in a mesh

I am trying to make a setup which need the routers to communicate between and them and exchange few custom messages.
Is there a specific package for custom payload and messages or with any of the C libraries we could do that?
Thanks

Assign the nodes an IP address and pick your favorite C or userland approach.

Thanks @jeff for the reply, I'm new to this so is that using sockets or something else?
Can you please give some more explanation of how to do that using C?

you could also use BMX7-sms for this, however this sends the message to all nodes

SMS Plugin

This plug-in uses routing packets to transmit any information from one node to the whole network. The good point is that propagation works even if there is no continuous data- path. Even though the WiFi network is under bad conditions (because the Wireless noise, distance between nodes, etc...), the data will be propagated. The current implementation, by default, sets a maximum size limit of several KBytes for each file.

The API of the sms plug-in is very simple. It simply clones the content of one or more files given by one node to all other nodes. All other nodes can do the same. Once started, each node will have two directories: /var/run/bmx7/sms/rcvdSms and /var/run/bmx7/sms/sendSms .

Files are cloned from the sendSms folder on the current node to the rcvdSmS folder on all other nodes with the syncSms option using the following steps

  • Place (or link) files you want to send in /var/run/bmx7/sms/sendSms
  • Use the syncSms option in BMX7 to send the file: bmx7 -c syncSms="filename placed in the sendSms folder"

Wireless-mesh distros are using this feature for several things such as positioning Map information or a chat in web interface.

Thanks @markbirss for the reply.. I'll try it out.

You don’t need any special protocol assuming your mesh is working. Standard TCP/IP sockets, with any of the bazillion low-level or application-level interfaces.

mqqt would suit... you'd still need more userland ... etc.

You can then so something like;
/bin/mqqtmesh.sh

#!/bin/sh
cmds="$@"
echo $cmd | mosquitto_pub -h $host -t routermeshA -l
exit