diff options
Diffstat (limited to 'include/net/netrom.h')
-rw-r--r-- | include/net/netrom.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/include/net/netrom.h b/include/net/netrom.h index 45f2c7616d8b..ad05d7a3c55d 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define NR_DISCACK 0x04 | 22 | #define NR_DISCACK 0x04 |
23 | #define NR_INFO 0x05 | 23 | #define NR_INFO 0x05 |
24 | #define NR_INFOACK 0x06 | 24 | #define NR_INFOACK 0x06 |
25 | #define NR_RESET 0x07 | ||
25 | 26 | ||
26 | #define NR_CHOKE_FLAG 0x80 | 27 | #define NR_CHOKE_FLAG 0x80 |
27 | #define NR_NAK_FLAG 0x40 | 28 | #define NR_NAK_FLAG 0x40 |
@@ -51,6 +52,7 @@ enum { | |||
51 | #define NR_DEFAULT_TTL 16 /* Default Time To Live - 16 */ | 52 | #define NR_DEFAULT_TTL 16 /* Default Time To Live - 16 */ |
52 | #define NR_DEFAULT_ROUTING 1 /* Is routing enabled ? */ | 53 | #define NR_DEFAULT_ROUTING 1 /* Is routing enabled ? */ |
53 | #define NR_DEFAULT_FAILS 2 /* Link fails until route fails */ | 54 | #define NR_DEFAULT_FAILS 2 /* Link fails until route fails */ |
55 | #define NR_DEFAULT_RESET 0 /* Sent / accept reset cmds? */ | ||
54 | 56 | ||
55 | #define NR_MODULUS 256 | 57 | #define NR_MODULUS 256 |
56 | #define NR_MAX_WINDOW_SIZE 127 /* Maximum Window Allowable - 127 */ | 58 | #define NR_MAX_WINDOW_SIZE 127 /* Maximum Window Allowable - 127 */ |
@@ -176,6 +178,8 @@ extern int sysctl_netrom_transport_requested_window_size; | |||
176 | extern int sysctl_netrom_transport_no_activity_timeout; | 178 | extern int sysctl_netrom_transport_no_activity_timeout; |
177 | extern int sysctl_netrom_routing_control; | 179 | extern int sysctl_netrom_routing_control; |
178 | extern int sysctl_netrom_link_fails_count; | 180 | extern int sysctl_netrom_link_fails_count; |
181 | extern int sysctl_netrom_reset_circuit; | ||
182 | |||
179 | extern int nr_rx_frame(struct sk_buff *, struct net_device *); | 183 | extern int nr_rx_frame(struct sk_buff *, struct net_device *); |
180 | extern void nr_destroy_socket(struct sock *); | 184 | extern void nr_destroy_socket(struct sock *); |
181 | 185 | ||
@@ -218,7 +222,28 @@ extern void nr_requeue_frames(struct sock *); | |||
218 | extern int nr_validate_nr(struct sock *, unsigned short); | 222 | extern int nr_validate_nr(struct sock *, unsigned short); |
219 | extern int nr_in_rx_window(struct sock *, unsigned short); | 223 | extern int nr_in_rx_window(struct sock *, unsigned short); |
220 | extern void nr_write_internal(struct sock *, int); | 224 | extern void nr_write_internal(struct sock *, int); |
221 | extern void nr_transmit_refusal(struct sk_buff *, int); | 225 | |
226 | extern void __nr_transmit_reply(struct sk_buff *skb, int mine, | ||
227 | unsigned char cmdflags); | ||
228 | |||
229 | /* | ||
230 | * This routine is called when a Connect Acknowledge with the Choke Flag | ||
231 | * set is needed to refuse a connection. | ||
232 | */ | ||
233 | #define nr_transmit_refusal(skb, mine) \ | ||
234 | do { \ | ||
235 | __nr_transmit_reply((skb), (mine), NR_CONNACK | NR_CHOKE_FLAG); \ | ||
236 | } while (0) | ||
237 | |||
238 | /* | ||
239 | * This routine is called when we don't have a circuit matching an incoming | ||
240 | * NET/ROM packet. This is an G8PZT Xrouter extension. | ||
241 | */ | ||
242 | #define nr_transmit_reset(skb, mine) \ | ||
243 | do { \ | ||
244 | __nr_transmit_reply((skb), (mine), NR_RESET); \ | ||
245 | } while (0) | ||
246 | |||
222 | extern void nr_disconnect(struct sock *, int); | 247 | extern void nr_disconnect(struct sock *, int); |
223 | 248 | ||
224 | /* nr_timer.c */ | 249 | /* nr_timer.c */ |