Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/slip/slip.c

    ra17356fd r02a09ed  
    5858static int slip_close(iplink_srv_t *);
    5959static int slip_send(iplink_srv_t *, iplink_sdu_t *);
    60 static int slip_send6(iplink_srv_t *, iplink_sdu6_t *);
    6160static int slip_get_mtu(iplink_srv_t *, size_t *);
    62 static int slip_get_mac48(iplink_srv_t *, addr48_t *);
    6361static int slip_addr_add(iplink_srv_t *, inet_addr_t *);
    6462static int slip_addr_remove(iplink_srv_t *, inet_addr_t *);
     
    7068        .close = slip_close,
    7169        .send = slip_send,
    72         .send6 = slip_send6,
    7370        .get_mtu = slip_get_mtu,
    74         .get_mac48 = slip_get_mac48,
    7571        .addr_add = slip_addr_add,
    7672        .addr_remove = slip_addr_remove
     
    126122int slip_send(iplink_srv_t *srv, iplink_sdu_t *sdu)
    127123{
    128         log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_send()");
    129        
    130124        async_sess_t *sess = (async_sess_t *) srv->arg;
    131125        uint8_t *data = sdu->data;
    132        
     126        unsigned i;
     127
     128        log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_send()");
     129
    133130        /*
    134          * Strictly speaking, this is not prescribed by the RFC, but the RFC
    135          * suggests to start with sending a SLIP_END byte as a synchronization
    136          * measure for dealing with previous possible noise on the line.
    137          */
     131         * Strictly speaking, this is not prescribed by the RFC, but the RFC
     132         * suggests to start with sending a SLIP_END byte as a synchronization
     133         * measure for dealing with previous possible noise on the line.
     134         */
    138135        write_buffered(sess, SLIP_END);
    139        
    140         for (size_t i = 0; i < sdu->size; i++) {
     136
     137        for (i = 0; i < sdu->size; i++) {
    141138                switch (data[i]) {
    142139                case SLIP_END:
     
    153150                }
    154151        }
    155        
    156152        write_buffered(sess, SLIP_END);
    157153        write_flush(sess);
    158        
    159         return EOK;
    160 }
    161 
    162 int slip_send6(iplink_srv_t *srv, iplink_sdu6_t *sdu)
    163 {
    164         log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_send6()");
    165        
    166         return ENOTSUP;
     154
     155        return EOK;
    167156}
    168157
     
    172161        *mtu = SLIP_MTU;
    173162        return EOK;
    174 }
    175 
    176 int slip_get_mac48(iplink_srv_t *src, addr48_t *mac)
    177 {
    178         log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_get_mac48()");
    179         return ENOTSUP;
    180163}
    181164
Note: See TracChangeset for help on using the changeset viewer.