1 |
/* |
/* |
2 |
* Cisco 7200 (Predator) simulation platform. |
* Cisco router) simulation platform. |
3 |
* Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr) |
* Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr) |
4 |
* |
* |
5 |
* Network Input/Output Abstraction Layer. |
* Network Input/Output Abstraction Layer. |
206 |
return(-1); |
return(-1); |
207 |
} |
} |
208 |
|
|
209 |
|
/* Apply the bidirectional filter */ |
210 |
|
if (nio->both_filter != NULL) { |
211 |
|
res = nio->both_filter->pkt_handler(nio,pkt,len,nio->both_filter_data); |
212 |
|
|
213 |
|
if (res == NETIO_FILTER_ACTION_DROP) |
214 |
|
return(-1); |
215 |
|
} |
216 |
|
|
217 |
return(nio->send(nio->dptr,pkt,len)); |
return(nio->send(nio->dptr,pkt,len)); |
218 |
} |
} |
219 |
|
|
243 |
return(-1); |
return(-1); |
244 |
} |
} |
245 |
|
|
246 |
|
/* Apply the bidirectional filter */ |
247 |
|
if (nio->both_filter != NULL) { |
248 |
|
res = nio->both_filter->pkt_handler(nio,pkt,len,nio->both_filter_data); |
249 |
|
|
250 |
|
if (res == NETIO_FILTER_ACTION_DROP) |
251 |
|
return(-1); |
252 |
|
} |
253 |
|
|
254 |
return(len); |
return(len); |
255 |
} |
} |
256 |
|
|
1343 |
if (nio) { |
if (nio) { |
1344 |
netio_filter_unbind(nio,NETIO_FILTER_DIR_RX); |
netio_filter_unbind(nio,NETIO_FILTER_DIR_RX); |
1345 |
netio_filter_unbind(nio,NETIO_FILTER_DIR_TX); |
netio_filter_unbind(nio,NETIO_FILTER_DIR_TX); |
1346 |
|
netio_filter_unbind(nio,NETIO_FILTER_DIR_BOTH); |
1347 |
|
|
1348 |
switch(nio->type) { |
switch(nio->type) { |
1349 |
case NETIO_TYPE_UNIX: |
case NETIO_TYPE_UNIX: |