MCPcopy Create free account
hub / github.com/F-Stack/f-stack / debugnet_ack_output

Function debugnet_ack_output

freebsd/net/debugnet.c:190–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190int
191debugnet_ack_output(struct debugnet_pcb *pcb, uint32_t seqno /* net endian */)
192{
193 struct debugnet_ack *dn_ack;
194 struct mbuf *m;
195
196 DNETDEBUG("Acking with seqno %u\n", ntohl(seqno));
197
198 m = m_gethdr(M_NOWAIT, MT_DATA);
199 if (m == NULL) {
200 printf("%s: Out of mbufs\n", __func__);
201 return (ENOBUFS);
202 }
203 m->m_len = sizeof(*dn_ack);
204 m->m_pkthdr.len = sizeof(*dn_ack);
205 MH_ALIGN(m, sizeof(*dn_ack));
206 dn_ack = mtod(m, void *);
207 dn_ack->da_seqno = seqno;
208
209 return (debugnet_udp_output(pcb, m));
210}
211
212/*
213 * Dummy free function for debugnet clusters.

Callers 1

debugnet_handle_rx_msgFunction · 0.85

Calls 3

debugnet_udp_outputFunction · 0.85
m_gethdrFunction · 0.50
printfFunction · 0.50

Tested by

no test coverage detected