nr_subr.c (1d6ae775d7a948c9575658eb41184fd2e506c0df) nr_subr.c (e21ce8c7c013fb223a002c70bb0a547de6c26c12)
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * Copyright Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
8 */

--- 196 unchanged lines hidden (view full) ---

205 *dptr++ = frametype;
206 break;
207 }
208
209 nr_transmit_buffer(sk, skb);
210}
211
212/*
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * Copyright Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
8 */

--- 196 unchanged lines hidden (view full) ---

205 *dptr++ = frametype;
206 break;
207 }
208
209 nr_transmit_buffer(sk, skb);
210}
211
212/*
213 * This routine is called when a Connect Acknowledge with the Choke Flag
214 * set is needed to refuse a connection.
213 * This routine is called to send an error reply.
215 */
214 */
216void nr_transmit_refusal(struct sk_buff *skb, int mine)
215void __nr_transmit_reply(struct sk_buff *skb, int mine, unsigned char cmdflags)
217{
218 struct sk_buff *skbn;
219 unsigned char *dptr;
220 int len;
221
222 len = NR_NETWORK_LEN + NR_TRANSPORT_LEN + 1;
223
224 if ((skbn = alloc_skb(len, GFP_ATOMIC)) == NULL)

--- 24 unchanged lines hidden (view full) ---

249 *dptr++ = skb->data[16];
250 } else {
251 *dptr++ = skb->data[15];
252 *dptr++ = skb->data[16];
253 *dptr++ = 0;
254 *dptr++ = 0;
255 }
256
216{
217 struct sk_buff *skbn;
218 unsigned char *dptr;
219 int len;
220
221 len = NR_NETWORK_LEN + NR_TRANSPORT_LEN + 1;
222
223 if ((skbn = alloc_skb(len, GFP_ATOMIC)) == NULL)

--- 24 unchanged lines hidden (view full) ---

248 *dptr++ = skb->data[16];
249 } else {
250 *dptr++ = skb->data[15];
251 *dptr++ = skb->data[16];
252 *dptr++ = 0;
253 *dptr++ = 0;
254 }
255
257 *dptr++ = NR_CONNACK | NR_CHOKE_FLAG;
256 *dptr++ = cmdflags;
258 *dptr++ = 0;
259
260 if (!nr_route_frame(skbn, NULL))
261 kfree_skb(skbn);
262}
263
264void nr_disconnect(struct sock *sk, int reason)
265{

--- 18 unchanged lines hidden ---
257 *dptr++ = 0;
258
259 if (!nr_route_frame(skbn, NULL))
260 kfree_skb(skbn);
261}
262
263void nr_disconnect(struct sock *sk, int reason)
264{

--- 18 unchanged lines hidden ---