Lines Matching defs:neigh

30 static void rose_transmit_restart_confirmation(struct rose_neigh *neigh);
31 static void rose_transmit_restart_request(struct rose_neigh *neigh);
33 void rose_start_ftimer(struct rose_neigh *neigh)
35 del_timer(&neigh->ftimer);
37 neigh->ftimer.function = rose_ftimer_expiry;
38 neigh->ftimer.expires =
41 add_timer(&neigh->ftimer);
44 static void rose_start_t0timer(struct rose_neigh *neigh)
46 del_timer(&neigh->t0timer);
48 neigh->t0timer.function = rose_t0timer_expiry;
49 neigh->t0timer.expires =
52 add_timer(&neigh->t0timer);
55 void rose_stop_ftimer(struct rose_neigh *neigh)
57 del_timer(&neigh->ftimer);
60 void rose_stop_t0timer(struct rose_neigh *neigh)
62 del_timer(&neigh->t0timer);
65 int rose_ftimer_running(struct rose_neigh *neigh)
67 return timer_pending(&neigh->ftimer);
70 static int rose_t0timer_running(struct rose_neigh *neigh)
72 return timer_pending(&neigh->t0timer);
81 struct rose_neigh *neigh = from_timer(neigh, t, t0timer);
83 rose_transmit_restart_request(neigh);
85 neigh->dce_mode = 0;
87 rose_start_t0timer(neigh);
95 static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh)
101 rose_call = (const ax25_address *)neigh->dev->dev_addr;
105 ax25s = neigh->ax25;
106 neigh->ax25 = ax25_send_frame(skb, 260, rose_call, &neigh->callsign, neigh->digipeat, neigh->dev);
110 return neigh->ax25 != NULL;
118 static int rose_link_up(struct rose_neigh *neigh)
124 rose_call = (const ax25_address *)neigh->dev->dev_addr;
128 ax25s = neigh->ax25;
129 neigh->ax25 = ax25_find_cb(rose_call, &neigh->callsign, neigh->digipeat, neigh->dev);
133 return neigh->ax25 != NULL;
139 void rose_link_rx_restart(struct sk_buff *skb, struct rose_neigh *neigh, unsigned short frametype)
145 rose_stop_t0timer(neigh);
146 neigh->restarted = 1;
147 neigh->dce_mode = (skb->data[3] == ROSE_DTE_ORIGINATED);
148 rose_transmit_restart_confirmation(neigh);
152 rose_stop_t0timer(neigh);
153 neigh->restarted = 1;
166 if (neigh->restarted) {
167 while ((skbn = skb_dequeue(&neigh->queue)) != NULL)
168 if (!rose_send_frame(skbn, neigh))
176 static void rose_transmit_restart_request(struct rose_neigh *neigh)
198 if (!rose_send_frame(skb, neigh))
205 static void rose_transmit_restart_confirmation(struct rose_neigh *neigh)
225 if (!rose_send_frame(skb, neigh))
233 void rose_transmit_clear_request(struct rose_neigh *neigh, unsigned int lci, unsigned char cause, unsigned char diagnostic)
239 if (!neigh->dev)
258 if (!rose_send_frame(skb, neigh))
262 void rose_transmit_link(struct sk_buff *skb, struct rose_neigh *neigh)
266 if (neigh->loopback) {
267 rose_loopback_queue(skb, neigh);
271 if (!rose_link_up(neigh))
272 neigh->restarted = 0;
277 if (neigh->restarted) {
278 if (!rose_send_frame(skb, neigh))
281 skb_queue_tail(&neigh->queue, skb);
283 if (!rose_t0timer_running(neigh)) {
284 rose_transmit_restart_request(neigh);
285 neigh->dce_mode = 0;
286 rose_start_t0timer(neigh);