/[dynamips]/trunk/net_io.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/net_io.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.6-RC5/net_io.c revision 6 by dpavlin, Sat Oct 6 16:09:07 2007 UTC upstream/dynamips-0.2.7-RC1/net_io.c revision 7 by dpavlin, Sat Oct 6 16:23:47 2007 UTC
# Line 1  Line 1 
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.
# Line 206  ssize_t netio_send(netio_desc_t *nio,voi Line 206  ssize_t netio_send(netio_desc_t *nio,voi
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    
# Line 235  ssize_t netio_recv(netio_desc_t *nio,voi Line 243  ssize_t netio_recv(netio_desc_t *nio,voi
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    
# Line 1327  static int netio_free(void *data,void *a Line 1343  static int netio_free(void *data,void *a
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:

Legend:
Removed from v.6  
changed lines
  Added in v.7

  ViewVC Help
Powered by ViewVC 1.1.26