Changeset 8d48c7e in mainline for uspace/lib/nettl/src/portrng.c


Ignore:
Timestamp:
2015-06-02T16:00:42Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4bb828
Parents:
ab6326bc
Message:

Find the association to deliver the datagram using amap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nettl/src/portrng.c

    rab6326bc r8d48c7e  
    118118
    119119        p->pn = pnum;
     120        p->arg = arg;
    120121        list_append(&p->lprng, &pr->used);
    121122        *apnum = pnum;
     
    123124            pnum);
    124125        return EOK;
     126}
     127
     128int portrng_find_port(portrng_t *pr, uint16_t pnum, void **rarg)
     129{
     130        list_foreach(pr->used, lprng, portrng_port_t, port) {
     131                if (port->pn == pnum) {
     132                        *rarg = port->arg;
     133                        return EOK;
     134                }
     135        }
     136
     137        return ENOENT;
    125138}
    126139
Note: See TracChangeset for help on using the changeset viewer.