Changeset e767dbf in mainline for uspace/srv/inet/inet.c


Ignore:
Timestamp:
2012-02-09T22:57:05Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1493811
Parents:
ceba4bed
Message:

Sketch IP PDU encoding and decoding.
Unify IP packet routing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/inet/inet.c

    rceba4bed re767dbf  
    101101}
    102102
    103 static int inet_send(inet_client_t *client, inet_dgram_t *dgram,
    104     uint8_t ttl, int df)
     103static int inet_route_packet(inet_dgram_t *dgram, uint8_t ttl, int df)
    105104{
    106105        inet_addrobj_t *addr;
    107106
    108         addr = inet_addrobj_find(&dgram->dest);
     107        addr = inet_addrobj_find(&dgram->dest, iaf_net);
    109108        if (addr != NULL) {
    110109                /* Destination is directly accessible */
     
    115114        log_msg(LVL_DEBUG, "inet_send: No route to destination.");
    116115        return ENOENT;
     116}
     117
     118static int inet_send(inet_client_t *client, inet_dgram_t *dgram,
     119    uint8_t ttl, int df)
     120{
     121        return inet_route_packet(dgram, ttl, df);
    117122}
    118123
     
    255260}
    256261
     262int inet_recv_packet(inet_dgram_t *dgram, uint8_t ttl, int df)
     263{
     264        return inet_route_packet(dgram, ttl, df);
     265}
     266
    257267int main(int argc, char *argv[])
    258268{
Note: See TracChangeset for help on using the changeset viewer.