MNP(7) Miscellaneous Information Manual MNP(7) NNAAMMEE mmnnpp - mesh network protocol DDEESSCCRRIIPPTTIIOONN mmnnpp is a mesh network built on top of datagram sockets and little abstractions. It is used to exchange _u_n_i_q_u_e messages over a set of peers. MMeessssaaggee SSttrruuccttuurree The mmnnpp message has the following structure: +-------+--------+-----------+ | type | ttl | payload | +-------+--------+-----------+ |1 byte | 1 byte | N-2 bytes | +-------+--------+-----------+ where N is the maximum message size supported which is implementation- defined. _t_y_p_e is the type of a message. Supported types are listed in _M_e_s_s_a_g_e _T_y_p_e_s section. _t_t_l is the time to live. It is decremented on message receiving. When it is zero, message must not be transferred more. _p_a_y_l_o_a_d is the additional information for a message. It is type-defined. MMeessssaaggee TTyyppeess Message type defines the meaning of a message. It can be any of the following: TTRRAANNSSFFEERR 0 That message stores an information that should be broadcasted to all the sessions with an exception of sender. Payload stores the content which is undefined. If the same content was seen less than CONTENT_TIMEOUT seconds ago or less, it is discarded. Equality may be checked via an implementation-defined hash algorithm. CONTENT_TIMEOUT is an implementation-defined integer not less than 10. PPIINNGG 1 Since mmnnpp is _d_a_t_a_g_r_a_m based, peers should know whether connection is still active. Payload is implementation-defined. PPOONNGG 2 Should be returned in reply to PPIINNGG. Payload is implementation- defined. NNEEIIGGHHBBOOUURRSS 3 Since mmnnpp is a _m_e_s_h _n_e_t_w_o_r_k protocol, there should be some way to find peers. NNEEIIGGHHBBOOUURRSS is that way. Payload is empty. NNEEIIGGHHBBOOUURR 4 Returns a neighbour peer. Payload contains implementation- defined details of a peer which must be enough information to connect. Should be returned in reply to NNEEIIGGHHBBOOUURRSS. SSeessssiioonn Sessions are the way how mmnnpp mesh is formed. Session is a very implicit thing. Upon receiving PPIINNGG or PPOONNGG from an unknown client a session is created. If there was no activity in a session within SESSION_TIMEOUT seconds, it is destroyed. SESSION_TIMEOUT is an implementation-defined natural number. NNOOTTEESS Payload of TTRRAANNSSFFEERR is undefined. This is done this way because mmnnpp does not care about data being transferred, and content should be defined on a higher level. SSEEEE AALLSSOO recvfrom(2), sendto(2) AAUUTTHHOORRSS Nakidai Perumenei <_n_a_k_i_d_a_i_@_d_i_s_r_o_o_t_._o_r_g> CCAAVVEEAATTSS mmnnpp depends on datagram sockets. If to use something like UDP, it is important to keep in mind that it is unreliable. Also, it uses flooding broadcast mechanism. This means, that mmnnpp wants not too many peers, but enough to not loose messages. OpenBSD 7.7 February 11, 2026 OpenBSD 7.7