--- embedaddon/mpd/src/phys.c 2013/07/22 08:44:29 1.1.1.1 +++ embedaddon/mpd/src/phys.c 2016/11/01 09:56:12 1.1.1.2 @@ -466,6 +466,52 @@ PhysGetCalledNum(Link l, char *buf, size_t buf_len) } /* + * PhysGetMtu() + */ + +u_short +PhysGetMtu(Link l, int conf) +{ + PhysType const pt = l->type; + + if (pt) { + if (pt->getmtu) + return ((*pt->getmtu)(l, conf)); + if (conf == 0) { + if (pt->mtu) + return (pt->mtu); + else + return (0); + } else + return (l->conf.mtu); + } else + return (0); +} + +/* + * PhysGetMru() + */ + +u_short +PhysGetMru(Link l, int conf) +{ + PhysType const pt = l->type; + + if (pt) { + if (pt->getmru) + return ((*pt->getmru)(l, conf)); + if (conf == 0) { + if (pt->mru) + return (pt->mru); + else + return (0); + } else + return (l->conf.mru); + } else + return (0); +} + +/* * PhysIsBusy() * * This returns 1 if link is busy