Changeset b86a32e in mainline for uspace/srv/net/slip/slip.c


Ignore:
Timestamp:
2013-07-15T12:14:55Z (11 years ago)
Author:
Manuele Conti <conti.ma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c84146d3
Parents:
87159eb8 (diff), 956d4281 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline changes.

File:
1 edited

Legend:

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

    r87159eb8 rb86a32e  
    5858static int slip_close(iplink_srv_t *);
    5959static int slip_send(iplink_srv_t *, iplink_sdu_t *);
     60static int slip_send6(iplink_srv_t *, iplink_sdu6_t *);
    6061static int slip_get_mtu(iplink_srv_t *, size_t *);
     62static int slip_get_mac48(iplink_srv_t *, addr48_t *);
    6163static int slip_addr_add(iplink_srv_t *, inet_addr_t *);
    6264static int slip_addr_remove(iplink_srv_t *, inet_addr_t *);
     
    6870        .close = slip_close,
    6971        .send = slip_send,
     72        .send6 = slip_send6,
    7073        .get_mtu = slip_get_mtu,
     74        .get_mac48 = slip_get_mac48,
    7175        .addr_add = slip_addr_add,
    7276        .addr_remove = slip_addr_remove
     
    122126int slip_send(iplink_srv_t *srv, iplink_sdu_t *sdu)
    123127{
     128        log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_send()");
     129       
    124130        async_sess_t *sess = (async_sess_t *) srv->arg;
    125131        uint8_t *data = sdu->data;
    126         unsigned i;
    127 
    128         log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_send()");
    129 
     132       
    130133        /*
    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          */
     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         */
    135138        write_buffered(sess, SLIP_END);
    136 
    137         for (i = 0; i < sdu->size; i++) {
     139       
     140        for (size_t i = 0; i < sdu->size; i++) {
    138141                switch (data[i]) {
    139142                case SLIP_END:
     
    150153                }
    151154        }
     155       
    152156        write_buffered(sess, SLIP_END);
    153157        write_flush(sess);
    154 
    155         return EOK;
     158       
     159        return EOK;
     160}
     161
     162int slip_send6(iplink_srv_t *srv, iplink_sdu6_t *sdu)
     163{
     164        log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_send6()");
     165       
     166        return ENOTSUP;
    156167}
    157168
     
    161172        *mtu = SLIP_MTU;
    162173        return EOK;
     174}
     175
     176int slip_get_mac48(iplink_srv_t *src, addr48_t *mac)
     177{
     178        log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_get_mac48()");
     179        return ENOTSUP;
    163180}
    164181
Note: See TracChangeset for help on using the changeset viewer.