Iface.php 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207
  1. <?php
  2. /*
  3. Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
  4. All rights reserved.
  5. Contact: Barry O'Donovan - barry (at) opensolutions (dot) ie
  6. http://www.opensolutions.ie/
  7. This file is part of the OSS_SNMP package.
  8. Redistribution and use in source and binary forms, with or without
  9. modification, are permitted provided that the following conditions are met:
  10. * Redistributions of source code must retain the above copyright
  11. notice, this list of conditions and the following disclaimer.
  12. * Redistributions in binary form must reproduce the above copyright
  13. notice, this list of conditions and the following disclaimer in the
  14. documentation and/or other materials provided with the distribution.
  15. * Neither the name of Open Source Solutions Limited nor the
  16. names of its contributors may be used to endorse or promote products
  17. derived from this software without specific prior written permission.
  18. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  19. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  21. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
  22. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  23. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  24. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  25. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  27. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. */
  29. namespace OSS_SNMP\MIBS;
  30. /**
  31. * A class for performing SNMP V2 queries on generic devices
  32. *
  33. * @copyright Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
  34. * @author Barry O'Donovan <barry@opensolutions.ie>
  35. */
  36. class Iface extends \OSS_SNMP\MIB
  37. {
  38. const OID_IF_NUMBER = '.1.3.6.1.2.1.2.1.0';
  39. const OID_IF_DESCRIPTION = '.1.3.6.1.2.1.2.2.1.2';
  40. const OID_IF_TYPE = '.1.3.6.1.2.1.2.2.1.3';
  41. const OID_IF_MTU = '.1.3.6.1.2.1.2.2.1.4';
  42. const OID_IF_SPEED = '.1.3.6.1.2.1.2.2.1.5';
  43. const OID_IF_PHYS_ADDRESS = '.1.3.6.1.2.1.2.2.1.6';
  44. const OID_IF_ADMIN_STATUS = '.1.3.6.1.2.1.2.2.1.7';
  45. const OID_IF_OPER_STATUS = '.1.3.6.1.2.1.2.2.1.8';
  46. const OID_IF_LAST_CHANGE = '.1.3.6.1.2.1.2.2.1.9';
  47. const OID_IF_IN_OCTETS = '.1.3.6.1.2.1.2.2.1.10';
  48. const OID_IF_IN_UNICAST_PACKETS = '.1.3.6.1.2.1.2.2.1.11';
  49. const OID_IF_IN_NON_UNICAST_PACKETS = '.1.3.6.1.2.1.2.2.1.12';
  50. const OID_IF_IN_DISCARDS = '.1.3.6.1.2.1.2.2.1.13';
  51. const OID_IF_IN_ERRORS = '.1.3.6.1.2.1.2.2.1.14';
  52. const OID_IF_IN_UNKNOWN_PROTOCOLS = '.1.3.6.1.2.1.2.2.1.15';
  53. const OID_IF_OUT_OCTETS = '.1.3.6.1.2.1.2.2.1.16';
  54. const OID_IF_OUT_UNICAST_PACKETS = '.1.3.6.1.2.1.2.2.1.17';
  55. const OID_IF_OUT_NON_UNICAST_PACKETS = '.1.3.6.1.2.1.2.2.1.18';
  56. const OID_IF_OUT_DISCARDS = '.1.3.6.1.2.1.2.2.1.19';
  57. const OID_IF_OUT_ERRORS = '.1.3.6.1.2.1.2.2.1.20';
  58. const OID_IF_OUT_QUEUE_LENGTH = '.1.3.6.1.2.1.2.2.1.21';
  59. const OID_IF_NAME = '.1.3.6.1.2.1.31.1.1.1.1';
  60. const OID_IF_ALIAS = '.1.3.6.1.2.1.31.1.1.1.18';
  61. /**
  62. * Get the number of network interfaces (regardless of
  63. * their current state) present on this system.
  64. *
  65. * @return int The number of network interfaces on the system
  66. */
  67. public function numberOfInterfaces()
  68. {
  69. return $this->getSNMP()->get( self::OID_IF_NUMBER );
  70. }
  71. /**
  72. * Get an array of device MTUs
  73. *
  74. * @return array An array of device MTUs
  75. */
  76. public function mtus()
  77. {
  78. return $this->getSNMP()->walk1d( self::OID_IF_MTU );
  79. }
  80. /**
  81. * Get an array of the interfaces' physical addresses
  82. *
  83. * "The interface's address at the protocol layer
  84. * immediately `below' the network layer in the
  85. * protocol stack. For interfaces which do not have
  86. * such an address (e.g., a serial line), this object
  87. * should contain an octet string of zero length."
  88. *
  89. * @return array An array of device physical addresses
  90. */
  91. public function physAddresses()
  92. {
  93. return $this->getSNMP()->walk1d( self::OID_IF_PHYS_ADDRESS );
  94. }
  95. /**
  96. * Constant for possible value of interface admin status.
  97. * @see adminStates()
  98. */
  99. const IF_ADMIN_STATUS_UP = 1;
  100. /**
  101. * Constant for possible value of interface admin status.
  102. * @see adminStates()
  103. */
  104. const IF_ADMIN_STATUS_DOWN = 2;
  105. /**
  106. * Constant for possible value of interface admin status.
  107. * @see adminStates()
  108. */
  109. const IF_ADMIN_STATUS_TESTING = 3;
  110. /**
  111. * Text representation of interface admin status.
  112. *
  113. * @see adminStates()
  114. * @var array Text representations of interface admin status.
  115. */
  116. public static $IF_ADMIN_STATES = array(
  117. self::IF_ADMIN_STATUS_UP => 'up',
  118. self::IF_ADMIN_STATUS_DOWN => 'down',
  119. self::IF_ADMIN_STATUS_TESTING => 'testing'
  120. );
  121. /**
  122. * Get an array of device interface admin status (up / down)
  123. *
  124. * E.g. the follow SNMP output yields the shown array:
  125. *
  126. * .1.3.6.1.2.1.2.2.1.7.10128 = INTEGER: up(1)
  127. * .1.3.6.1.2.1.2.2.1.7.10129 = INTEGER: down(2)
  128. * ...
  129. *
  130. * [10128] => 1
  131. * [10129] => 2
  132. *
  133. * @see IF_ADMIN_STATES
  134. * @param boolean $translate If true, return the string representation
  135. * @return array An array of interface admin states
  136. */
  137. public function adminStates( $translate = false )
  138. {
  139. $states = $this->getSNMP()->walk1d( self::OID_IF_ADMIN_STATUS );
  140. if( !$translate )
  141. return $states;
  142. return $this->getSNMP()->translate( $states, self::$IF_ADMIN_STATES );
  143. }
  144. /**
  145. * Get an array of device interface last change times
  146. *
  147. * Value returned is timeticks (one hundreds of a second)
  148. *
  149. * "The value of sysUpTime at the time the interface
  150. * entered its current operational state. If the
  151. * current state was entered prior to the last re-
  152. * initialization of the local network management
  153. * subsystem, then this object contains a zero
  154. * value."
  155. *
  156. * @see \OSS_SNMP\MIBS\System::uptime()
  157. * @return array Timeticks (or zero) since last change of the interfaces
  158. */
  159. public function lastChanges()
  160. {
  161. return $this->getSNMP()->walk1d( self::OID_IF_LAST_CHANGE );
  162. }
  163. /**
  164. * Get an array of device interface in octets
  165. *
  166. * "The total number of octets received on the
  167. * interface, including framing characters."
  168. *
  169. * @return array The total number of octets received on interfaces
  170. */
  171. public function inOctets()
  172. {
  173. return $this->getSNMP()->walk1d( self::OID_IF_IN_OCTETS );
  174. }
  175. /**
  176. * Get an array of device interface unicast packets in
  177. *
  178. * "The number of subnetwork-unicast packets
  179. * delivered to a higher-layer protocol."
  180. *
  181. * @return array The total number of unicast packets received on interfaces
  182. */
  183. public function inUnicastPackets()
  184. {
  185. return $this->getSNMP()->walk1d( self::OID_IF_IN_UNICAST_PACKETS );
  186. }
  187. /**
  188. * Get an array of device interface non-unicast packets in
  189. *
  190. * "The number of non-unicast (i.e., subnetwork-
  191. * broadcast or subnetwork-multicast) packets
  192. * delivered to a higher-layer protocol."
  193. *
  194. * @return array The total number of non-unicast packets received on interfaces
  195. */
  196. public function inNonUnicastPackets()
  197. {
  198. return $this->getSNMP()->walk1d( self::OID_IF_IN_NON_UNICAST_PACKETS );
  199. }
  200. /**
  201. * Get an array of device interface inbound discarded packets
  202. *
  203. * "The number of inbound packets which were chosen
  204. * to be discarded even though no errors had been
  205. * detected to prevent their being deliverable to a
  206. * higher-layer protocol. One possible reason for
  207. * discarding such a packet could be to free up
  208. * buffer space."
  209. *
  210. * @return arrary The total number of discarded inbound packets received on interfaces
  211. */
  212. public function inDiscards()
  213. {
  214. return $this->getSNMP()->walk1d( self::OID_IF_IN_DISCARDS );
  215. }
  216. /**
  217. * Get an array of device interface inbound error packets
  218. *
  219. * "The number of inbound packets that contained
  220. * errors preventing them from being deliverable to a
  221. * higher-layer protocol."
  222. *
  223. * @return array The total number of error inbound packets received on interfaces
  224. */
  225. public function inErrors()
  226. {
  227. return $this->getSNMP()->walk1d( self::OID_IF_IN_ERRORS );
  228. }
  229. /**
  230. * Get an array of device interface out octets
  231. *
  232. * "The total number of octets transmitted out of the
  233. * interface, including framing characters."
  234. *
  235. * @return array The total number of octets transmitted on interfaces
  236. */
  237. public function outOctets()
  238. {
  239. return $this->getSNMP()->walk1d( self::OID_IF_OUT_OCTETS );
  240. }
  241. /**
  242. * Get an array of device interface unicast packets out
  243. *
  244. * "The total number of packets that higher-level
  245. * protocols requested be transmitted to a
  246. * subnetwork-unicast address, including those that
  247. * were discarded or not sent."
  248. *
  249. * @return array The total number of unicast packets transmitted on interfaces
  250. */
  251. public function outUnicastPackets()
  252. {
  253. return $this->getSNMP()->walk1d( self::OID_IF_OUT_UNICAST_PACKETS );
  254. }
  255. /**
  256. * Get an array of device interface non-unicast packets out
  257. *
  258. * "The total number of packets that higher-level
  259. * protocols requested be transmitted to a non-
  260. * unicast (i.e., a subnetwork-broadcast or
  261. * subnetwork-multicast) address, including those
  262. * that were discarded or not sent."
  263. *
  264. * @return array The total number of non-unicast packets requested sent interfaces
  265. */
  266. public function outNonUnicastPackets()
  267. {
  268. return $this->getSNMP()->walk1d( self::OID_IF_OUT_NON_UNICAST_PACKETS );
  269. }
  270. /**
  271. * Get an array of device interface outbound discarded packets
  272. *
  273. * "The number of outbound packets which were chosen
  274. * to be discarded even though no errors had been
  275. * detected to prevent their being transmitted. One
  276. * possible reason for discarding such a packet could
  277. * be to free up buffer space."
  278. *
  279. * @return arrary The total number of discarded outbound packets
  280. */
  281. public function outDiscards()
  282. {
  283. return $this->getSNMP()->walk1d( self::OID_IF_OUT_DISCARDS );
  284. }
  285. /**
  286. * Get an array of device interface outbound error packets
  287. *
  288. * "The number of outbound packets that could not be
  289. * transmitted because of errors."
  290. *
  291. * @return array The total number of error outbound packets received on interfaces
  292. */
  293. public function outErrors()
  294. {
  295. return $this->getSNMP()->walk1d( self::OID_IF_OUT_ERRORS );
  296. }
  297. /**
  298. * Get an array of interface outbound queue lengths
  299. *
  300. * "The length of the output packet queue (in packets)"
  301. *
  302. * @return array The total number of packets in the outbound queues
  303. */
  304. public function outQueueLength()
  305. {
  306. return $this->getSNMP()->walk1d( self::OID_IF_OUT_QUEUE_LENGTH );
  307. }
  308. /**
  309. * Get an array of packets received on an interface of unknown protocol
  310. *
  311. * "The number of packets received via the interface
  312. * which were discarded because of an unknown or
  313. * unsupported protocol."
  314. *
  315. * @return array The number of packets received on an interface of unknown protocol
  316. */
  317. public function inUnknownProtocols()
  318. {
  319. return $this->getSNMP()->walk1d( self::OID_IF_IN_UNKNOWN_PROTOCOLS );
  320. }
  321. /**
  322. * Get an array of device interface names
  323. *
  324. * E.g. the following SNMP output yields the shown array:
  325. *
  326. * .1.3.6.1.2.1.31.1.1.1.1.10128 = STRING: Gi1/0/28
  327. * .1.3.6.1.2.1.31.1.1.1.1.10129 = STRING: Gi1/0/29
  328. * ...
  329. *
  330. * [10128] => "Gi1/0/28"
  331. * [10129] => "Gi1/0/29"
  332. *
  333. * @return array An array of interface names
  334. */
  335. public function names()
  336. {
  337. return $this->getSNMP()->walk1d( self::OID_IF_NAME );
  338. }
  339. /**
  340. * Get an array of device interface aliases (e.g. as set by the interface description / port-name parameter)
  341. *
  342. * E.g. the followig SNMP output yields the shown array:
  343. *
  344. * .1.3.6.1.2.1.2.2.1.2.18.10128 = STRING: Connection to switch2
  345. * .1.3.6.1.2.1.2.2.1.2.18.10129 = STRING: Connection to switch3
  346. * ...
  347. *
  348. * [10128] => "Connection to switch2"
  349. * [10129] => "Connection to switch3"
  350. *
  351. * @return array An array of interface aliases
  352. */
  353. public function aliases()
  354. {
  355. return $this->getSNMP()->walk1d( self::OID_IF_ALIAS );
  356. }
  357. /**
  358. * Get an array of device interface descriptions
  359. *
  360. * E.g. the following SNMP output yields the shown array:
  361. *
  362. * .1.3.6.1.2.1.31.1.1.1.1.10128 = STRING: GigabitEthernet1/0/28
  363. * .1.3.6.1.2.1.31.1.1.1.1.10129 = STRING: GigabitEthernet1/0/29
  364. * ...
  365. *
  366. * [10128] => "GigabitEthernet1/0/28"
  367. * [10129] => "GigabitEthernet1/0/29"
  368. *
  369. * @return array An array of interface descriptions
  370. */
  371. public function descriptions()
  372. {
  373. return $this->getSNMP()->walk1d( self::OID_IF_DESCRIPTION );
  374. }
  375. /**
  376. * Get an array of device interface (operating) speeds
  377. *
  378. * E.g. the following SNMP output yields the shown array:
  379. *
  380. * .1.3.6.1.2.1.2.2.1.5.10128 = Gauge32: 1000000000
  381. * .1.3.6.1.2.1.2.2.1.5.10129 = Gauge32: 100000000
  382. * ...
  383. *
  384. * [10128] => 1000000000
  385. * [10129] => 100000000
  386. *
  387. * NB: operating speed as opposed to maximum speed
  388. *
  389. * @return array An array of interface operating speeds
  390. */
  391. public function speeds()
  392. {
  393. return $this->getSNMP()->walk1d( self::OID_IF_SPEED );
  394. }
  395. /**
  396. * Constant for possible value of interface operation status.
  397. * @see operationStates()
  398. */
  399. const IF_OPER_STATUS_UP = 1;
  400. /**
  401. * Constant for possible value of interface operation status.
  402. * @see operationStates()
  403. */
  404. const IF_OPER_STATUS_DOWN = 2;
  405. /**
  406. * Constant for possible value of interface operation status.
  407. * @see operationStates()
  408. */
  409. const IF_OPER_STATUS_TESTING = 3;
  410. /**
  411. * Constant for possible value of interface operation status.
  412. * @see operationStates()
  413. */
  414. const IF_OPER_STATUS_UNKNOWN = 4;
  415. /**
  416. * Constant for possible value of interface operation status.
  417. * @see operationStates()
  418. */
  419. const IF_OPER_STATUS_DORMANT = 5;
  420. /**
  421. * Constant for possible value of interface operation status.
  422. * @see operationStates()
  423. */
  424. const IF_OPER_STATUS_NOT_PRESENT = 6;
  425. /**
  426. * Constant for possible value of interface operation status.
  427. * @see operationStates()
  428. */
  429. const IF_OPER_STATUS_LOWER_LAYER_DOWN = 7;
  430. /**
  431. * Text representation of interface operating status.
  432. *
  433. * @see operationStates()
  434. * @var array Text representations of interface operating status.
  435. */
  436. public static $IF_OPER_STATES = array(
  437. self::IF_OPER_STATUS_UP => 'up',
  438. self::IF_OPER_STATUS_DOWN => 'down',
  439. self::IF_OPER_STATUS_TESTING => 'testing',
  440. self::IF_OPER_STATUS_UNKNOWN => 'unknown',
  441. self::IF_OPER_STATUS_DORMANT => 'dormant',
  442. self::IF_OPER_STATUS_NOT_PRESENT => 'notPresent',
  443. self::IF_OPER_STATUS_LOWER_LAYER_DOWN => 'lowerLayerDown'
  444. );
  445. /**
  446. * Get an array of device interface operating status (up / down)
  447. *
  448. * E.g. the follow SNMP output yields the shown array:
  449. *
  450. * .1.3.6.1.2.1.2.2.1.8.10128 = INTEGER: up(1)
  451. * .1.3.6.1.2.1.2.2.1.8.10129 = INTEGER: down(2)
  452. * ...
  453. *
  454. * [10128] => 1
  455. * [10129] => 2
  456. *
  457. * @see IF_OPER_STATES
  458. * @param boolean $translate If true, return the string representation
  459. * @return array An array of interface states
  460. */
  461. public function operationStates( $translate = false )
  462. {
  463. $states = $this->getSNMP()->walk1d( self::OID_IF_OPER_STATUS );
  464. if( !$translate )
  465. return $states;
  466. return $this->getSNMP()->translate( $states, self::$IF_OPER_STATES );
  467. }
  468. /**
  469. * Constant for possible type of an interface
  470. * @see types()
  471. */
  472. const IF_TYPE_OTHER = 1;
  473. /**
  474. * Constant for possible type of an interface
  475. * @see types()
  476. */
  477. const IF_TYPE_REGULAR1822 = 2;
  478. /**
  479. * Constant for possible type of an interface
  480. * @see types()
  481. */
  482. const IF_TYPE_HDH1822 = 3;
  483. /**
  484. * Constant for possible type of an interface
  485. * @see types()
  486. */
  487. const IF_TYPE_DDNX25 = 4;
  488. /**
  489. * Constant for possible type of an interface
  490. * @see types()
  491. */
  492. const IF_TYPE_RFC877X25 = 5;
  493. /**
  494. * Constant for possible type of an interface
  495. * @see types()
  496. */
  497. const IF_TYPE_ETHERNETCSMACD = 6;
  498. /**
  499. * Constant for possible type of an interface
  500. * @see types()
  501. */
  502. const IF_TYPE_ISO88023CSMACD = 7;
  503. /**
  504. * Constant for possible type of an interface
  505. * @see types()
  506. */
  507. const IF_TYPE_ISO88024TOKENBUS = 8;
  508. /**
  509. * Constant for possible type of an interface
  510. * @see types()
  511. */
  512. const IF_TYPE_ISO88025TOKENRING = 9;
  513. /**
  514. * Constant for possible type of an interface
  515. * @see types()
  516. */
  517. const IF_TYPE_ISO88026MAN = 10;
  518. /**
  519. * Constant for possible type of an interface
  520. * @see types()
  521. */
  522. const IF_TYPE_STARLAN = 11;
  523. /**
  524. * Constant for possible type of an interface
  525. * @see types()
  526. */
  527. const IF_TYPE_PROTEON10MBIT = 12;
  528. /**
  529. * Constant for possible type of an interface
  530. * @see types()
  531. */
  532. const IF_TYPE_PROTEON80MBIT = 13;
  533. /**
  534. * Constant for possible type of an interface
  535. * @see types()
  536. */
  537. const IF_TYPE_HYPERCHANNEL = 14;
  538. /**
  539. * Constant for possible type of an interface
  540. * @see types()
  541. */
  542. const IF_TYPE_FDDI = 15;
  543. /**
  544. * Constant for possible type of an interface
  545. * @see types()
  546. */
  547. const IF_TYPE_LAPB = 16;
  548. /**
  549. * Constant for possible type of an interface
  550. * @see types()
  551. */
  552. const IF_TYPE_SDLC = 17;
  553. /**
  554. * Constant for possible type of an interface
  555. * @see types()
  556. */
  557. const IF_TYPE_DS1 = 18;
  558. /**
  559. * Constant for possible type of an interface
  560. * @see types()
  561. */
  562. const IF_TYPE_E1 = 19;
  563. /**
  564. * Constant for possible type of an interface
  565. * @see types()
  566. */
  567. const IF_TYPE_BASICISDN = 20;
  568. /**
  569. * Constant for possible type of an interface
  570. * @see types()
  571. */
  572. const IF_TYPE_PRIMARYISDN = 21;
  573. /**
  574. * Constant for possible type of an interface
  575. * @see types()
  576. */
  577. const IF_TYPE_PROPPOINTTOPOINTSERIAL = 22;
  578. /**
  579. * Constant for possible type of an interface
  580. * @see types()
  581. */
  582. const IF_TYPE_PPP = 23;
  583. /**
  584. * Constant for possible type of an interface
  585. * @see types()
  586. */
  587. const IF_TYPE_SOFTWARELOOPBACK = 24;
  588. /**
  589. * Constant for possible type of an interface
  590. * @see types()
  591. */
  592. const IF_TYPE_EON = 25;
  593. /**
  594. * Constant for possible type of an interface
  595. * @see types()
  596. */
  597. const IF_TYPE_ETHERNET3MBIT = 26;
  598. /**
  599. * Constant for possible type of an interface
  600. * @see types()
  601. */
  602. const IF_TYPE_NSIP = 27;
  603. /**
  604. * Constant for possible type of an interface
  605. * @see types()
  606. */
  607. const IF_TYPE_SLIP = 28;
  608. /**
  609. * Constant for possible type of an interface
  610. * @see types()
  611. */
  612. const IF_TYPE_ULTRA = 29;
  613. /**
  614. * Constant for possible type of an interface
  615. * @see types()
  616. */
  617. const IF_TYPE_DS3 = 30;
  618. /**
  619. * Constant for possible type of an interface
  620. * @see types()
  621. */
  622. const IF_TYPE_SIP = 31;
  623. /**
  624. * Constant for possible type of an interface
  625. * @see types()
  626. */
  627. const IF_TYPE_FRAMERELAY = 32;
  628. /**
  629. * Constant for possible type of an interface
  630. * @see types()
  631. */
  632. const IF_TYPE_RS232 = 33;
  633. /**
  634. * Constant for possible type of an interface
  635. * @see types()
  636. */
  637. const IF_TYPE_PARA = 34;
  638. /**
  639. * Constant for possible type of an interface
  640. * @see types()
  641. */
  642. const IF_TYPE_ARCNET = 35;
  643. /**
  644. * Constant for possible type of an interface
  645. * @see types()
  646. */
  647. const IF_TYPE_ARCNETPLUS = 36;
  648. /**
  649. * Constant for possible type of an interface
  650. * @see types()
  651. */
  652. const IF_TYPE_ATM = 37;
  653. /**
  654. * Constant for possible type of an interface
  655. * @see types()
  656. */
  657. const IF_TYPE_MIOX25 = 38;
  658. /**
  659. * Constant for possible type of an interface
  660. * @see types()
  661. */
  662. const IF_TYPE_SONET = 39;
  663. /**
  664. * Constant for possible type of an interface
  665. * @see types()
  666. */
  667. const IF_TYPE_X25PLE = 40;
  668. /**
  669. * Constant for possible type of an interface
  670. * @see types()
  671. */
  672. const IF_TYPE_ISO88022LLC = 41;
  673. /**
  674. * Constant for possible type of an interface
  675. * @see types()
  676. */
  677. const IF_TYPE_LOCALTALK = 42;
  678. /**
  679. * Constant for possible type of an interface
  680. * @see types()
  681. */
  682. const IF_TYPE_SMDSDXI = 43;
  683. /**
  684. * Constant for possible type of an interface
  685. * @see types()
  686. */
  687. const IF_TYPE_FRAMERELAYSERVICE = 44;
  688. /**
  689. * Constant for possible type of an interface
  690. * @see types()
  691. */
  692. const IF_TYPE_V35 = 45;
  693. /**
  694. * Constant for possible type of an interface
  695. * @see types()
  696. */
  697. const IF_TYPE_HSSI = 46;
  698. /**
  699. * Constant for possible type of an interface
  700. * @see types()
  701. */
  702. const IF_TYPE_HIPPI = 47;
  703. /**
  704. * Constant for possible type of an interface
  705. * @see types()
  706. */
  707. const IF_TYPE_MODEM = 48;
  708. /**
  709. * Constant for possible type of an interface
  710. * @see types()
  711. */
  712. const IF_TYPE_AAL5 = 49;
  713. /**
  714. * Constant for possible type of an interface
  715. * @see types()
  716. */
  717. const IF_TYPE_SONETPATH = 50;
  718. /**
  719. * Constant for possible type of an interface
  720. * @see types()
  721. */
  722. const IF_TYPE_SONETVT = 51;
  723. /**
  724. * Constant for possible type of an interface
  725. * @see types()
  726. */
  727. const IF_TYPE_SMDSICIP = 52;
  728. /**
  729. * Constant for possible type of an interface
  730. * @see types()
  731. */
  732. const IF_TYPE_PROPVIRTUAL = 53;
  733. /**
  734. * Constant for possible type of an interface
  735. * @see types()
  736. */
  737. const IF_TYPE_PROPMULTIPLEXOR = 54;
  738. /**
  739. * Constant for possible type of an interface
  740. * @see types()
  741. */
  742. const IF_TYPE_IEEE80212 = 55;
  743. /**
  744. * Constant for possible type of an interface
  745. * @see types()
  746. */
  747. const IF_TYPE_FIBRECHANNEL = 56;
  748. /**
  749. * Constant for possible type of an interface
  750. * @see types()
  751. */
  752. const IF_TYPE_HIPPIINTERFACE = 57;
  753. /**
  754. * Constant for possible type of an interface
  755. * @see types()
  756. */
  757. const IF_TYPE_FRAMERELAYINTERCONNECT = 58;
  758. /**
  759. * Constant for possible type of an interface
  760. * @see types()
  761. */
  762. const IF_TYPE_AFLANE8023 = 59;
  763. /**
  764. * Constant for possible type of an interface
  765. * @see types()
  766. */
  767. const IF_TYPE_AFLANE8025 = 60;
  768. /**
  769. * Constant for possible type of an interface
  770. * @see types()
  771. */
  772. const IF_TYPE_CCTEMUL = 61;
  773. /**
  774. * Constant for possible type of an interface
  775. * @see types()
  776. */
  777. const IF_TYPE_FASTETHER = 62;
  778. /**
  779. * Constant for possible type of an interface
  780. * @see types()
  781. */
  782. const IF_TYPE_ISDN = 63;
  783. /**
  784. * Constant for possible type of an interface
  785. * @see types()
  786. */
  787. const IF_TYPE_V11 = 64;
  788. /**
  789. * Constant for possible type of an interface
  790. * @see types()
  791. */
  792. const IF_TYPE_V36 = 65;
  793. /**
  794. * Constant for possible type of an interface
  795. * @see types()
  796. */
  797. const IF_TYPE_G703AT64K = 66;
  798. /**
  799. * Constant for possible type of an interface
  800. * @see types()
  801. */
  802. const IF_TYPE_G703AT2MB = 67;
  803. /**
  804. * Constant for possible type of an interface
  805. * @see types()
  806. */
  807. const IF_TYPE_QLLC = 68;
  808. /**
  809. * Constant for possible type of an interface
  810. * @see types()
  811. */
  812. const IF_TYPE_FASTETHERFX = 69;
  813. /**
  814. * Constant for possible type of an interface
  815. * @see types()
  816. */
  817. const IF_TYPE_CHANNEL = 70;
  818. /**
  819. * Constant for possible type of an interface
  820. * @see types()
  821. */
  822. const IF_TYPE_IEEE80211 = 71;
  823. /**
  824. * Constant for possible type of an interface
  825. * @see types()
  826. */
  827. const IF_TYPE_IBM370PARCHAN = 72;
  828. /**
  829. * Constant for possible type of an interface
  830. * @see types()
  831. */
  832. const IF_TYPE_ESCON = 73;
  833. /**
  834. * Constant for possible type of an interface
  835. * @see types()
  836. */
  837. const IF_TYPE_DLSW = 74;
  838. /**
  839. * Constant for possible type of an interface
  840. * @see types()
  841. */
  842. const IF_TYPE_ISDNS = 75;
  843. /**
  844. * Constant for possible type of an interface
  845. * @see types()
  846. */
  847. const IF_TYPE_ISDNU = 76;
  848. /**
  849. * Constant for possible type of an interface
  850. * @see types()
  851. */
  852. const IF_TYPE_LAPD = 77;
  853. /**
  854. * Constant for possible type of an interface
  855. * @see types()
  856. */
  857. const IF_TYPE_IPSWITCH = 78;
  858. /**
  859. * Constant for possible type of an interface
  860. * @see types()
  861. */
  862. const IF_TYPE_RSRB = 79;
  863. /**
  864. * Constant for possible type of an interface
  865. * @see types()
  866. */
  867. const IF_TYPE_ATMLOGICAL = 80;
  868. /**
  869. * Constant for possible type of an interface
  870. * @see types()
  871. */
  872. const IF_TYPE_DS0 = 81;
  873. /**
  874. * Constant for possible type of an interface
  875. * @see types()
  876. */
  877. const IF_TYPE_DS0BUNDLE = 82;
  878. /**
  879. * Constant for possible type of an interface
  880. * @see types()
  881. */
  882. const IF_TYPE_BSC = 83;
  883. /**
  884. * Constant for possible type of an interface
  885. * @see types()
  886. */
  887. const IF_TYPE_ASYNC = 84;
  888. /**
  889. * Constant for possible type of an interface
  890. * @see types()
  891. */
  892. const IF_TYPE_CNR = 85;
  893. /**
  894. * Constant for possible type of an interface
  895. * @see types()
  896. */
  897. const IF_TYPE_ISO88025DTR = 86;
  898. /**
  899. * Constant for possible type of an interface
  900. * @see types()
  901. */
  902. const IF_TYPE_EPLRS = 87;
  903. /**
  904. * Constant for possible type of an interface
  905. * @see types()
  906. */
  907. const IF_TYPE_ARAP = 88;
  908. /**
  909. * Constant for possible type of an interface
  910. * @see types()
  911. */
  912. const IF_TYPE_PROPCNLS = 89;
  913. /**
  914. * Constant for possible type of an interface
  915. * @see types()
  916. */
  917. const IF_TYPE_HOSTPAD = 90;
  918. /**
  919. * Constant for possible type of an interface
  920. * @see types()
  921. */
  922. const IF_TYPE_TERMPAD = 91;
  923. /**
  924. * Constant for possible type of an interface
  925. * @see types()
  926. */
  927. const IF_TYPE_FRAMERELAYMPI = 92;
  928. /**
  929. * Constant for possible type of an interface
  930. * @see types()
  931. */
  932. const IF_TYPE_X213 = 93;
  933. /**
  934. * Constant for possible type of an interface
  935. * @see types()
  936. */
  937. const IF_TYPE_ADSL = 94;
  938. /**
  939. * Constant for possible type of an interface
  940. * @see types()
  941. */
  942. const IF_TYPE_RADSL = 95;
  943. /**
  944. * Constant for possible type of an interface
  945. * @see types()
  946. */
  947. const IF_TYPE_SDSL = 96;
  948. /**
  949. * Constant for possible type of an interface
  950. * @see types()
  951. */
  952. const IF_TYPE_VDSL = 97;
  953. /**
  954. * Constant for possible type of an interface
  955. * @see types()
  956. */
  957. const IF_TYPE_ISO88025CRFPINT = 98;
  958. /**
  959. * Constant for possible type of an interface
  960. * @see types()
  961. */
  962. const IF_TYPE_MYRINET = 99;
  963. /**
  964. * Constant for possible type of an interface
  965. * @see types()
  966. */
  967. const IF_TYPE_VOICEEM = 100;
  968. /**
  969. * Constant for possible type of an interface
  970. * @see types()
  971. */
  972. const IF_TYPE_VOICEFXO = 101;
  973. /**
  974. * Constant for possible type of an interface
  975. * @see types()
  976. */
  977. const IF_TYPE_VOICEFXS = 102;
  978. /**
  979. * Constant for possible type of an interface
  980. * @see types()
  981. */
  982. const IF_TYPE_VOICEENCAP = 103;
  983. /**
  984. * Constant for possible type of an interface
  985. * @see types()
  986. */
  987. const IF_TYPE_VOICEOVERIP = 104;
  988. /**
  989. * Constant for possible type of an interface
  990. * @see types()
  991. */
  992. const IF_TYPE_ATMDXI = 105;
  993. /**
  994. * Constant for possible type of an interface
  995. * @see types()
  996. */
  997. const IF_TYPE_ATMFUNI = 106;
  998. /**
  999. * Constant for possible type of an interface
  1000. * @see types()
  1001. */
  1002. const IF_TYPE_ATMIMA = 107;
  1003. /**
  1004. * Constant for possible type of an interface
  1005. * @see types()
  1006. */
  1007. const IF_TYPE_PPPMULTILINKBUNDLE = 108;
  1008. /**
  1009. * Constant for possible type of an interface
  1010. * @see types()
  1011. */
  1012. const IF_TYPE_IPOVERCDLC = 109;
  1013. /**
  1014. * Constant for possible type of an interface
  1015. * @see types()
  1016. */
  1017. const IF_TYPE_IPOVERCLAW = 110;
  1018. /**
  1019. * Constant for possible type of an interface
  1020. * @see types()
  1021. */
  1022. const IF_TYPE_STACKTOSTACK = 111;
  1023. /**
  1024. * Constant for possible type of an interface
  1025. * @see types()
  1026. */
  1027. const IF_TYPE_VIRTUALIPADDRESS = 112;
  1028. /**
  1029. * Constant for possible type of an interface
  1030. * @see types()
  1031. */
  1032. const IF_TYPE_MPC = 113;
  1033. /**
  1034. * Constant for possible type of an interface
  1035. * @see types()
  1036. */
  1037. const IF_TYPE_IPOVERATM = 114;
  1038. /**
  1039. * Constant for possible type of an interface
  1040. * @see types()
  1041. */
  1042. const IF_TYPE_ISO88025FIBER = 115;
  1043. /**
  1044. * Constant for possible type of an interface
  1045. * @see types()
  1046. */
  1047. const IF_TYPE_TDLC = 116;
  1048. /**
  1049. * Constant for possible type of an interface
  1050. * @see types()
  1051. */
  1052. const IF_TYPE_GIGABITETHERNET = 117;
  1053. /**
  1054. * Constant for possible type of an interface
  1055. * @see types()
  1056. */
  1057. const IF_TYPE_HDLC = 118;
  1058. /**
  1059. * Constant for possible type of an interface
  1060. * @see types()
  1061. */
  1062. const IF_TYPE_LAPF = 119;
  1063. /**
  1064. * Constant for possible type of an interface
  1065. * @see types()
  1066. */
  1067. const IF_TYPE_V37 = 120;
  1068. /**
  1069. * Constant for possible type of an interface
  1070. * @see types()
  1071. */
  1072. const IF_TYPE_X25MLP = 121;
  1073. /**
  1074. * Constant for possible type of an interface
  1075. * @see types()
  1076. */
  1077. const IF_TYPE_X25HUNTGROUP = 122;
  1078. /**
  1079. * Constant for possible type of an interface
  1080. * @see types()
  1081. */
  1082. const IF_TYPE_TRASNPHDLC = 123;
  1083. /**
  1084. * Constant for possible type of an interface
  1085. * @see types()
  1086. */
  1087. const IF_TYPE_INTERLEAVE = 124;
  1088. /**
  1089. * Constant for possible type of an interface
  1090. * @see types()
  1091. */
  1092. const IF_TYPE_FAST = 125;
  1093. /**
  1094. * Constant for possible type of an interface
  1095. * @see types()
  1096. */
  1097. const IF_TYPE_IP = 126;
  1098. /**
  1099. * Constant for possible type of an interface
  1100. * @see types()
  1101. */
  1102. const IF_TYPE_DOCSCABLEMACLAYER = 127;
  1103. /**
  1104. * Constant for possible type of an interface
  1105. * @see types()
  1106. */
  1107. const IF_TYPE_DOCSCABLEDOWNSTREAM = 128;
  1108. /**
  1109. * Constant for possible type of an interface
  1110. * @see types()
  1111. */
  1112. const IF_TYPE_DOCSCABLEUPSTREAM = 129;
  1113. /**
  1114. * Constant for possible type of an interface
  1115. * @see types()
  1116. */
  1117. const IF_TYPE_A12MPPSWITCH = 130;
  1118. /**
  1119. * Constant for possible type of an interface
  1120. * @see types()
  1121. */
  1122. const IF_TYPE_TUNNEL = 131;
  1123. /**
  1124. * Constant for possible type of an interface
  1125. * @see types()
  1126. */
  1127. const IF_TYPE_COFFEE = 132;
  1128. /**
  1129. * Constant for possible type of an interface
  1130. * @see types()
  1131. */
  1132. const IF_TYPE_CES = 133;
  1133. /**
  1134. * Constant for possible type of an interface
  1135. * @see types()
  1136. */
  1137. const IF_TYPE_ATMSUBINTERFACE = 134;
  1138. /**
  1139. * Constant for possible type of an interface
  1140. * @see types()
  1141. */
  1142. const IF_TYPE_L2VLAN = 135;
  1143. /**
  1144. * Constant for possible type of an interface
  1145. * @see types()
  1146. */
  1147. const IF_TYPE_L3IPVLAN = 136;
  1148. /**
  1149. * Constant for possible type of an interface
  1150. * @see types()
  1151. */
  1152. const IF_TYPE_L3IPXVLAN = 137;
  1153. /**
  1154. * Constant for possible type of an interface
  1155. * @see types()
  1156. */
  1157. const IF_TYPE_DIGITALPOWERLINE = 138;
  1158. /**
  1159. * Constant for possible type of an interface
  1160. * @see types()
  1161. */
  1162. const IF_TYPE_MEDIAMAILOVERIP = 139;
  1163. /**
  1164. * Constant for possible type of an interface
  1165. * @see types()
  1166. */
  1167. const IF_TYPE_DTM = 140;
  1168. /**
  1169. * Constant for possible type of an interface
  1170. * @see types()
  1171. */
  1172. const IF_TYPE_DCN = 141;
  1173. /**
  1174. * Constant for possible type of an interface
  1175. * @see types()
  1176. */
  1177. const IF_TYPE_IPFORWARD = 142;
  1178. /**
  1179. * Constant for possible type of an interface
  1180. * @see types()
  1181. */
  1182. const IF_TYPE_MSDSL = 143;
  1183. /**
  1184. * Constant for possible type of an interface
  1185. * @see types()
  1186. */
  1187. const IF_TYPE_IEEE1394 = 144;
  1188. /**
  1189. * Constant for possible type of an interface
  1190. * @see types()
  1191. */
  1192. const IF_TYPE_IF_GSN = 145;
  1193. /**
  1194. * Constant for possible type of an interface
  1195. * @see types()
  1196. */
  1197. const IF_TYPE_DVBRCCMACLAYER = 146;
  1198. /**
  1199. * Constant for possible type of an interface
  1200. * @see types()
  1201. */
  1202. const IF_TYPE_DVBRCCDOWNSTREAM = 147;
  1203. /**
  1204. * Constant for possible type of an interface
  1205. * @see types()
  1206. */
  1207. const IF_TYPE_DVBRCCUPSTREAM = 148;
  1208. /**
  1209. * Constant for possible type of an interface
  1210. * @see types()
  1211. */
  1212. const IF_TYPE_ATMVIRTUAL = 149;
  1213. /**
  1214. * Constant for possible type of an interface
  1215. * @see types()
  1216. */
  1217. const IF_TYPE_MPLSTUNNEL = 150;
  1218. /**
  1219. * Constant for possible type of an interface
  1220. * @see types()
  1221. */
  1222. const IF_TYPE_SRP = 151;
  1223. /**
  1224. * Constant for possible type of an interface
  1225. * @see types()
  1226. */
  1227. const IF_TYPE_VOICEOVERATM = 152;
  1228. /**
  1229. * Constant for possible type of an interface
  1230. * @see types()
  1231. */
  1232. const IF_TYPE_VOICEOVERFRAMERELAY = 153;
  1233. /**
  1234. * Constant for possible type of an interface
  1235. * @see types()
  1236. */
  1237. const IF_TYPE_IDSL = 154;
  1238. /**
  1239. * Constant for possible type of an interface
  1240. * @see types()
  1241. */
  1242. const IF_TYPE_COMPOSITELINK = 155;
  1243. /**
  1244. * Constant for possible type of an interface
  1245. * @see types()
  1246. */
  1247. const IF_TYPE_SS7SIGLINK = 156;
  1248. /**
  1249. * Constant for possible type of an interface
  1250. * @see types()
  1251. */
  1252. const IF_TYPE_PROPWIRELESSP2P = 157;
  1253. /**
  1254. * Constant for possible type of an interface
  1255. * @see types()
  1256. */
  1257. const IF_TYPE_FRFORWARD = 158;
  1258. /**
  1259. * Constant for possible type of an interface
  1260. * @see types()
  1261. */
  1262. const IF_TYPE_RFC1483 = 159;
  1263. /**
  1264. * Constant for possible type of an interface
  1265. * @see types()
  1266. */
  1267. const IF_TYPE_USB = 160;
  1268. /**
  1269. * Constant for possible type of an interface
  1270. * @see types()
  1271. */
  1272. const IF_TYPE_IEEE8023ADLAG = 161;
  1273. /**
  1274. * Constant for possible type of an interface
  1275. * @see types()
  1276. */
  1277. const IF_TYPE_BGPPOLICYACCOUNTING = 162;
  1278. /**
  1279. * Constant for possible type of an interface
  1280. * @see types()
  1281. */
  1282. const IF_TYPE_FRF16MFRBUNDLE = 163;
  1283. /**
  1284. * Constant for possible type of an interface
  1285. * @see types()
  1286. */
  1287. const IF_TYPE_H323GATEKEEPER = 164;
  1288. /**
  1289. * Constant for possible type of an interface
  1290. * @see types()
  1291. */
  1292. const IF_TYPE_H323PROXY = 165;
  1293. /**
  1294. * Constant for possible type of an interface
  1295. * @see types()
  1296. */
  1297. const IF_TYPE_MPLS = 166;
  1298. /**
  1299. * Constant for possible type of an interface
  1300. * @see types()
  1301. */
  1302. const IF_TYPE_MFSIGLINK = 167;
  1303. /**
  1304. * Constant for possible type of an interface
  1305. * @see types()
  1306. */
  1307. const IF_TYPE_HDSL2 = 168;
  1308. /**
  1309. * Constant for possible type of an interface
  1310. * @see types()
  1311. */
  1312. const IF_TYPE_SHDSL = 169;
  1313. /**
  1314. * Constant for possible type of an interface
  1315. * @see types()
  1316. */
  1317. const IF_TYPE_DS1FDL = 170;
  1318. /**
  1319. * Constant for possible type of an interface
  1320. * @see types()
  1321. */
  1322. const IF_TYPE_POS = 171;
  1323. /**
  1324. * Constant for possible type of an interface
  1325. * @see types()
  1326. */
  1327. const IF_TYPE_DVBASIIN = 172;
  1328. /**
  1329. * Constant for possible type of an interface
  1330. * @see types()
  1331. */
  1332. const IF_TYPE_DVBASIOUT = 173;
  1333. /**
  1334. * Constant for possible type of an interface
  1335. * @see types()
  1336. */
  1337. const IF_TYPE_PLC = 174;
  1338. /**
  1339. * Constant for possible type of an interface
  1340. * @see types()
  1341. */
  1342. const IF_TYPE_NFAS = 175;
  1343. /**
  1344. * Constant for possible type of an interface
  1345. * @see types()
  1346. */
  1347. const IF_TYPE_TR008 = 176;
  1348. /**
  1349. * Constant for possible type of an interface
  1350. * @see types()
  1351. */
  1352. const IF_TYPE_GR303RDT = 177;
  1353. /**
  1354. * Constant for possible type of an interface
  1355. * @see types()
  1356. */
  1357. const IF_TYPE_GR303IDT = 178;
  1358. /**
  1359. * Constant for possible type of an interface
  1360. * @see types()
  1361. */
  1362. const IF_TYPE_ISUP = 179;
  1363. /**
  1364. * Constant for possible type of an interface
  1365. * @see types()
  1366. */
  1367. const IF_TYPE_PROPDOCSWIRELESSMACLAYER = 180;
  1368. /**
  1369. * Constant for possible type of an interface
  1370. * @see types()
  1371. */
  1372. const IF_TYPE_PROPDOCSWIRELESSDOWNSTREAM = 181;
  1373. /**
  1374. * Constant for possible type of an interface
  1375. * @see types()
  1376. */
  1377. const IF_TYPE_PROPDOCSWIRELESSUPSTREAM = 182;
  1378. /**
  1379. * Constant for possible type of an interface
  1380. * @see types()
  1381. */
  1382. const IF_TYPE_HIPERLAN2 = 183;
  1383. /**
  1384. * Constant for possible type of an interface
  1385. * @see types()
  1386. */
  1387. const IF_TYPE_PROPBWAP2MP = 184;
  1388. /**
  1389. * Constant for possible type of an interface
  1390. * @see types()
  1391. */
  1392. const IF_TYPE_SONETOVERHEADCHANNEL = 185;
  1393. /**
  1394. * Constant for possible type of an interface
  1395. * @see types()
  1396. */
  1397. const IF_TYPE_DIGITALWRAPPEROVERHEADCHANNEL = 186;
  1398. /**
  1399. * Constant for possible type of an interface
  1400. * @see types()
  1401. */
  1402. const IF_TYPE_AAL2 = 187;
  1403. /**
  1404. * Constant for possible type of an interface
  1405. * @see types()
  1406. */
  1407. const IF_TYPE_RADIOMAC = 188;
  1408. /**
  1409. * Constant for possible type of an interface
  1410. * @see types()
  1411. */
  1412. const IF_TYPE_ATMRADIO = 189;
  1413. /**
  1414. * Constant for possible type of an interface
  1415. * @see types()
  1416. */
  1417. const IF_TYPE_IMT = 190;
  1418. /**
  1419. * Constant for possible type of an interface
  1420. * @see types()
  1421. */
  1422. const IF_TYPE_MVL = 191;
  1423. /**
  1424. * Constant for possible type of an interface
  1425. * @see types()
  1426. */
  1427. const IF_TYPE_REACHDSL = 192;
  1428. /**
  1429. * Constant for possible type of an interface
  1430. * @see types()
  1431. */
  1432. const IF_TYPE_FRDLCIENDPT = 193;
  1433. /**
  1434. * Constant for possible type of an interface
  1435. * @see types()
  1436. */
  1437. const IF_TYPE_ATMVCIENDPT = 194;
  1438. /**
  1439. * Constant for possible type of an interface
  1440. * @see types()
  1441. */
  1442. const IF_TYPE_OPTICALCHANNEL = 195;
  1443. /**
  1444. * Constant for possible type of an interface
  1445. * @see types()
  1446. */
  1447. const IF_TYPE_OPTICALTRANSPORT = 196;
  1448. /**
  1449. * Constant for possible type of an interface
  1450. * @see types()
  1451. */
  1452. const IF_TYPE_PROPATM = 197;
  1453. /**
  1454. * Constant for possible type of an interface
  1455. * @see types()
  1456. */
  1457. const IF_TYPE_VOICEOVERCABLE = 198;
  1458. /**
  1459. * Constant for possible type of an interface
  1460. * @see types()
  1461. */
  1462. const IF_TYPE_INFINIBAND = 199;
  1463. /**
  1464. * Constant for possible type of an interface
  1465. * @see types()
  1466. */
  1467. const IF_TYPE_TELINK = 200;
  1468. /**
  1469. * Constant for possible type of an interface
  1470. * @see types()
  1471. */
  1472. const IF_TYPE_Q2931 = 201;
  1473. /**
  1474. * Constant for possible type of an interface
  1475. * @see types()
  1476. */
  1477. const IF_TYPE_VIRTUALTG = 202;
  1478. /**
  1479. * Constant for possible type of an interface
  1480. * @see types()
  1481. */
  1482. const IF_TYPE_SIPTG = 203;
  1483. /**
  1484. * Constant for possible type of an interface
  1485. * @see types()
  1486. */
  1487. const IF_TYPE_SIPSIG = 204;
  1488. /**
  1489. * Constant for possible type of an interface
  1490. * @see types()
  1491. */
  1492. const IF_TYPE_DOCSCABLEUPSTREAMCHANNEL = 205;
  1493. /**
  1494. * Constant for possible type of an interface
  1495. * @see types()
  1496. */
  1497. const IF_TYPE_ECONET = 206;
  1498. /**
  1499. * Constant for possible type of an interface
  1500. * @see types()
  1501. */
  1502. const IF_TYPE_PON155 = 207;
  1503. /**
  1504. * Constant for possible type of an interface
  1505. * @see types()
  1506. */
  1507. const IF_TYPE_PON622 = 208;
  1508. /**
  1509. * Constant for possible type of an interface
  1510. * @see types()
  1511. */
  1512. const IF_TYPE_BRIDGE = 209;
  1513. /**
  1514. * Constant for possible type of an interface
  1515. * @see types()
  1516. */
  1517. const IF_TYPE_LINEGROUP = 210;
  1518. /**
  1519. * Constant for possible type of an interface
  1520. * @see types()
  1521. */
  1522. const IF_TYPE_VOICEEMFGD = 211;
  1523. /**
  1524. * Constant for possible type of an interface
  1525. * @see types()
  1526. */
  1527. const IF_TYPE_VOICEFGDEANA = 212;
  1528. /**
  1529. * Constant for possible type of an interface
  1530. * @see types()
  1531. */
  1532. const IF_TYPE_VOICEDID = 213;
  1533. /**
  1534. * Constant for possible type of an interface
  1535. * @see types()
  1536. */
  1537. const IF_TYPE_MPEGTRANSPORT = 214;
  1538. /**
  1539. * Constant for possible type of an interface
  1540. * @see types()
  1541. */
  1542. const IF_TYPE_SIXTOFOUR = 215;
  1543. /**
  1544. * Constant for possible type of an interface
  1545. * @see types()
  1546. */
  1547. const IF_TYPE_GTP = 216;
  1548. /**
  1549. * Constant for possible type of an interface
  1550. * @see types()
  1551. */
  1552. const IF_TYPE_PDNETHERLOOP1 = 217;
  1553. /**
  1554. * Constant for possible type of an interface
  1555. * @see types()
  1556. */
  1557. const IF_TYPE_PDNETHERLOOP2 = 218;
  1558. /**
  1559. * Constant for possible type of an interface
  1560. * @see types()
  1561. */
  1562. const IF_TYPE_OPTICALCHANNELGROUP = 219;
  1563. /**
  1564. * Constant for possible type of an interface
  1565. * @see types()
  1566. */
  1567. const IF_TYPE_HOMEPNA = 220;
  1568. /**
  1569. * Constant for possible type of an interface
  1570. * @see types()
  1571. */
  1572. const IF_TYPE_GFP = 221;
  1573. /**
  1574. * Constant for possible type of an interface
  1575. * @see types()
  1576. */
  1577. const IF_TYPE_CISCOISLVLAN = 222;
  1578. /**
  1579. * Constant for possible type of an interface
  1580. * @see types()
  1581. */
  1582. const IF_TYPE_ACTELISMETALOOP = 223;
  1583. /**
  1584. * Constant for possible type of an interface
  1585. * @see types()
  1586. */
  1587. const IF_TYPE_FCIPLINK = 224;
  1588. /**
  1589. * Constant for possible type of an interface
  1590. * @see types()
  1591. */
  1592. const IF_TYPE_RPR = 225;
  1593. /**
  1594. * Constant for possible type of an interface
  1595. * @see types()
  1596. */
  1597. const IF_TYPE_QAM = 226;
  1598. /**
  1599. * Constant for possible type of an interface
  1600. * @see types()
  1601. */
  1602. const IF_TYPE_LMP = 227;
  1603. /**
  1604. * Constant for possible type of an interface
  1605. * @see types()
  1606. */
  1607. const IF_TYPE_CBLVECTASTAR = 228;
  1608. /**
  1609. * Constant for possible type of an interface
  1610. * @see types()
  1611. */
  1612. const IF_TYPE_DOCSCABLEMCMTSDOWNSTREAM = 229;
  1613. /**
  1614. * Constant for possible type of an interface
  1615. * @see types()
  1616. */
  1617. const IF_TYPE_ADSL2 = 230;
  1618. /**
  1619. * Constant for possible type of an interface
  1620. * @see types()
  1621. */
  1622. const IF_TYPE_MACSECCONTROLLEDIF = 231;
  1623. /**
  1624. * Constant for possible type of an interface
  1625. * @see types()
  1626. */
  1627. const IF_TYPE_MACSECUNCONTROLLEDIF = 232;
  1628. /**
  1629. * Constant for possible type of an interface
  1630. * @see types()
  1631. */
  1632. const IF_TYPE_AVICIOPTICALETHER = 233;
  1633. /**
  1634. * Constant for possible type of an interface
  1635. * @see types()
  1636. */
  1637. const IF_TYPE_ATMBOND = 234;
  1638. /**
  1639. * Text representation of interface types.
  1640. *
  1641. * @see types()
  1642. * @var array Text representations of interface types.
  1643. */
  1644. public static $IF_TYPES = array(
  1645. self::IF_TYPE_OTHER => 'other',
  1646. self::IF_TYPE_REGULAR1822 => 'regular1822',
  1647. self::IF_TYPE_HDH1822 => 'hdh1822',
  1648. self::IF_TYPE_DDNX25 => 'ddnX25',
  1649. self::IF_TYPE_RFC877X25 => 'rfc877x25',
  1650. self::IF_TYPE_ETHERNETCSMACD => 'ethernetCsmacd',
  1651. self::IF_TYPE_ISO88023CSMACD => 'iso88023Csmacd',
  1652. self::IF_TYPE_ISO88024TOKENBUS => 'iso88024TokenBus',
  1653. self::IF_TYPE_ISO88025TOKENRING => 'iso88025TokenRing',
  1654. self::IF_TYPE_ISO88026MAN => 'iso88026Man',
  1655. self::IF_TYPE_STARLAN => 'starLan',
  1656. self::IF_TYPE_PROTEON10MBIT => 'proteon10Mbit',
  1657. self::IF_TYPE_PROTEON80MBIT => 'proteon80Mbit',
  1658. self::IF_TYPE_HYPERCHANNEL => 'hyperchannel',
  1659. self::IF_TYPE_FDDI => 'fddi',
  1660. self::IF_TYPE_LAPB => 'lapb',
  1661. self::IF_TYPE_SDLC => 'sdlc',
  1662. self::IF_TYPE_DS1 => 'ds1',
  1663. self::IF_TYPE_E1 => 'e1',
  1664. self::IF_TYPE_BASICISDN => 'basicISDN',
  1665. self::IF_TYPE_PRIMARYISDN => 'primaryISDN',
  1666. self::IF_TYPE_PROPPOINTTOPOINTSERIAL => 'propPointToPointSerial',
  1667. self::IF_TYPE_PPP => 'ppp',
  1668. self::IF_TYPE_SOFTWARELOOPBACK => 'softwareLoopback',
  1669. self::IF_TYPE_EON => 'eon',
  1670. self::IF_TYPE_ETHERNET3MBIT => 'ethernet3Mbit',
  1671. self::IF_TYPE_NSIP => 'nsip',
  1672. self::IF_TYPE_SLIP => 'slip',
  1673. self::IF_TYPE_ULTRA => 'ultra',
  1674. self::IF_TYPE_DS3 => 'ds3',
  1675. self::IF_TYPE_SIP => 'sip',
  1676. self::IF_TYPE_FRAMERELAY => 'frameRelay',
  1677. self::IF_TYPE_RS232 => 'rs232',
  1678. self::IF_TYPE_PARA => 'para',
  1679. self::IF_TYPE_ARCNET => 'arcnet',
  1680. self::IF_TYPE_ARCNETPLUS => 'arcnetPlus',
  1681. self::IF_TYPE_ATM => 'atm',
  1682. self::IF_TYPE_MIOX25 => 'miox25',
  1683. self::IF_TYPE_SONET => 'sonet',
  1684. self::IF_TYPE_X25PLE => 'x25ple',
  1685. self::IF_TYPE_ISO88022LLC => 'iso88022llc',
  1686. self::IF_TYPE_LOCALTALK => 'localTalk',
  1687. self::IF_TYPE_SMDSDXI => 'smdsDxi',
  1688. self::IF_TYPE_FRAMERELAYSERVICE => 'frameRelayService',
  1689. self::IF_TYPE_V35 => 'v35',
  1690. self::IF_TYPE_HSSI => 'hssi',
  1691. self::IF_TYPE_HIPPI => 'hippi',
  1692. self::IF_TYPE_MODEM => 'modem',
  1693. self::IF_TYPE_AAL5 => 'aal5',
  1694. self::IF_TYPE_SONETPATH => 'sonetPath',
  1695. self::IF_TYPE_SONETVT => 'sonetVT',
  1696. self::IF_TYPE_SMDSICIP => 'smdsIcip',
  1697. self::IF_TYPE_PROPVIRTUAL => 'propVirtual',
  1698. self::IF_TYPE_PROPMULTIPLEXOR => 'propMultiplexor',
  1699. self::IF_TYPE_IEEE80212 => 'ieee80212',
  1700. self::IF_TYPE_FIBRECHANNEL => 'fibreChannel',
  1701. self::IF_TYPE_HIPPIINTERFACE => 'hippiInterface',
  1702. self::IF_TYPE_FRAMERELAYINTERCONNECT => 'frameRelayInterconnect',
  1703. self::IF_TYPE_AFLANE8023 => 'aflane8023',
  1704. self::IF_TYPE_AFLANE8025 => 'aflane8025',
  1705. self::IF_TYPE_CCTEMUL => 'cctEmul',
  1706. self::IF_TYPE_FASTETHER => 'fastEther',
  1707. self::IF_TYPE_ISDN => 'isdn',
  1708. self::IF_TYPE_V11 => 'v11',
  1709. self::IF_TYPE_V36 => 'v36',
  1710. self::IF_TYPE_G703AT64K => 'g703at64k',
  1711. self::IF_TYPE_G703AT2MB => 'g703at2mb',
  1712. self::IF_TYPE_QLLC => 'qllc',
  1713. self::IF_TYPE_FASTETHERFX => 'fastEtherFX',
  1714. self::IF_TYPE_CHANNEL => 'channel',
  1715. self::IF_TYPE_IEEE80211 => 'ieee80211',
  1716. self::IF_TYPE_IBM370PARCHAN => 'ibm370parChan',
  1717. self::IF_TYPE_ESCON => 'escon',
  1718. self::IF_TYPE_DLSW => 'dlsw',
  1719. self::IF_TYPE_ISDNS => 'isdns',
  1720. self::IF_TYPE_ISDNU => 'isdnu',
  1721. self::IF_TYPE_LAPD => 'lapd',
  1722. self::IF_TYPE_IPSWITCH => 'ipSwitch',
  1723. self::IF_TYPE_RSRB => 'rsrb',
  1724. self::IF_TYPE_ATMLOGICAL => 'atmLogical',
  1725. self::IF_TYPE_DS0 => 'ds0',
  1726. self::IF_TYPE_DS0BUNDLE => 'ds0Bundle',
  1727. self::IF_TYPE_BSC => 'bsc',
  1728. self::IF_TYPE_ASYNC => 'async',
  1729. self::IF_TYPE_CNR => 'cnr',
  1730. self::IF_TYPE_ISO88025DTR => 'iso88025Dtr',
  1731. self::IF_TYPE_EPLRS => 'eplrs',
  1732. self::IF_TYPE_ARAP => 'arap',
  1733. self::IF_TYPE_PROPCNLS => 'propCnls',
  1734. self::IF_TYPE_HOSTPAD => 'hostPad',
  1735. self::IF_TYPE_TERMPAD => 'termPad',
  1736. self::IF_TYPE_FRAMERELAYMPI => 'frameRelayMPI',
  1737. self::IF_TYPE_X213 => 'x213',
  1738. self::IF_TYPE_ADSL => 'adsl',
  1739. self::IF_TYPE_RADSL => 'radsl',
  1740. self::IF_TYPE_SDSL => 'sdsl',
  1741. self::IF_TYPE_VDSL => 'vdsl',
  1742. self::IF_TYPE_ISO88025CRFPINT => 'iso88025CRFPInt',
  1743. self::IF_TYPE_MYRINET => 'myrinet',
  1744. self::IF_TYPE_VOICEEM => 'voiceEM',
  1745. self::IF_TYPE_VOICEFXO => 'voiceFXO',
  1746. self::IF_TYPE_VOICEFXS => 'voiceFXS',
  1747. self::IF_TYPE_VOICEENCAP => 'voiceEncap',
  1748. self::IF_TYPE_VOICEOVERIP => 'voiceOverIp',
  1749. self::IF_TYPE_ATMDXI => 'atmDxi',
  1750. self::IF_TYPE_ATMFUNI => 'atmFuni',
  1751. self::IF_TYPE_ATMIMA => 'atmIma',
  1752. self::IF_TYPE_PPPMULTILINKBUNDLE => 'pppMultilinkBundle',
  1753. self::IF_TYPE_IPOVERCDLC => 'ipOverCdlc',
  1754. self::IF_TYPE_IPOVERCLAW => 'ipOverClaw',
  1755. self::IF_TYPE_STACKTOSTACK => 'stackToStack',
  1756. self::IF_TYPE_VIRTUALIPADDRESS => 'virtualIpAddress',
  1757. self::IF_TYPE_MPC => 'mpc',
  1758. self::IF_TYPE_IPOVERATM => 'ipOverAtm',
  1759. self::IF_TYPE_ISO88025FIBER => 'iso88025Fiber',
  1760. self::IF_TYPE_TDLC => 'tdlc',
  1761. self::IF_TYPE_GIGABITETHERNET => 'gigabitEthernet',
  1762. self::IF_TYPE_HDLC => 'hdlc',
  1763. self::IF_TYPE_LAPF => 'lapf',
  1764. self::IF_TYPE_V37 => 'v37',
  1765. self::IF_TYPE_X25MLP => 'x25mlp',
  1766. self::IF_TYPE_X25HUNTGROUP => 'x25huntGroup',
  1767. self::IF_TYPE_TRASNPHDLC => 'trasnpHdlc',
  1768. self::IF_TYPE_INTERLEAVE => 'interleave',
  1769. self::IF_TYPE_FAST => 'fast',
  1770. self::IF_TYPE_IP => 'ip',
  1771. self::IF_TYPE_DOCSCABLEMACLAYER => 'docsCableMaclayer',
  1772. self::IF_TYPE_DOCSCABLEDOWNSTREAM => 'docsCableDownstream',
  1773. self::IF_TYPE_DOCSCABLEUPSTREAM => 'docsCableUpstream',
  1774. self::IF_TYPE_A12MPPSWITCH => 'a12MppSwitch',
  1775. self::IF_TYPE_TUNNEL => 'tunnel',
  1776. self::IF_TYPE_COFFEE => 'coffee',
  1777. self::IF_TYPE_CES => 'ces',
  1778. self::IF_TYPE_ATMSUBINTERFACE => 'atmSubInterface',
  1779. self::IF_TYPE_L2VLAN => 'l2vlan',
  1780. self::IF_TYPE_L3IPVLAN => 'l3ipvlan',
  1781. self::IF_TYPE_L3IPXVLAN => 'l3ipxvlan',
  1782. self::IF_TYPE_DIGITALPOWERLINE => 'digitalPowerline',
  1783. self::IF_TYPE_MEDIAMAILOVERIP => 'mediaMailOverIp',
  1784. self::IF_TYPE_DTM => 'dtm',
  1785. self::IF_TYPE_DCN => 'dcn',
  1786. self::IF_TYPE_IPFORWARD => 'ipForward',
  1787. self::IF_TYPE_MSDSL => 'msdsl',
  1788. self::IF_TYPE_IEEE1394 => 'ieee1394',
  1789. self::IF_TYPE_IF_GSN => 'if-gsn',
  1790. self::IF_TYPE_DVBRCCMACLAYER => 'dvbRccMacLayer',
  1791. self::IF_TYPE_DVBRCCDOWNSTREAM => 'dvbRccDownstream',
  1792. self::IF_TYPE_DVBRCCUPSTREAM => 'dvbRccUpstream',
  1793. self::IF_TYPE_ATMVIRTUAL => 'atmVirtual',
  1794. self::IF_TYPE_MPLSTUNNEL => 'mplsTunnel',
  1795. self::IF_TYPE_SRP => 'srp',
  1796. self::IF_TYPE_VOICEOVERATM => 'voiceOverAtm',
  1797. self::IF_TYPE_VOICEOVERFRAMERELAY => 'voiceOverFrameRelay',
  1798. self::IF_TYPE_IDSL => 'idsl',
  1799. self::IF_TYPE_COMPOSITELINK => 'compositeLink',
  1800. self::IF_TYPE_SS7SIGLINK => 'ss7SigLink',
  1801. self::IF_TYPE_PROPWIRELESSP2P => 'propWirelessP2P',
  1802. self::IF_TYPE_FRFORWARD => 'frForward',
  1803. self::IF_TYPE_RFC1483 => 'rfc1483',
  1804. self::IF_TYPE_USB => 'usb',
  1805. self::IF_TYPE_IEEE8023ADLAG => 'ieee8023adLag',
  1806. self::IF_TYPE_BGPPOLICYACCOUNTING => 'bgppolicyaccounting',
  1807. self::IF_TYPE_FRF16MFRBUNDLE => 'frf16MfrBundle',
  1808. self::IF_TYPE_H323GATEKEEPER => 'h323Gatekeeper',
  1809. self::IF_TYPE_H323PROXY => 'h323Proxy',
  1810. self::IF_TYPE_MPLS => 'mpls',
  1811. self::IF_TYPE_MFSIGLINK => 'mfSigLink',
  1812. self::IF_TYPE_HDSL2 => 'hdsl2',
  1813. self::IF_TYPE_SHDSL => 'shdsl',
  1814. self::IF_TYPE_DS1FDL => 'ds1FDL',
  1815. self::IF_TYPE_POS => 'pos',
  1816. self::IF_TYPE_DVBASIIN => 'dvbAsiIn',
  1817. self::IF_TYPE_DVBASIOUT => 'dvbAsiOut',
  1818. self::IF_TYPE_PLC => 'plc',
  1819. self::IF_TYPE_NFAS => 'nfas',
  1820. self::IF_TYPE_TR008 => 'tr008',
  1821. self::IF_TYPE_GR303RDT => 'gr303RDT',
  1822. self::IF_TYPE_GR303IDT => 'gr303IDT',
  1823. self::IF_TYPE_ISUP => 'isup',
  1824. self::IF_TYPE_PROPDOCSWIRELESSMACLAYER => 'propDocsWirelessMaclayer',
  1825. self::IF_TYPE_PROPDOCSWIRELESSDOWNSTREAM => 'propDocsWirelessDownstream',
  1826. self::IF_TYPE_PROPDOCSWIRELESSUPSTREAM => 'propDocsWirelessUpstream',
  1827. self::IF_TYPE_HIPERLAN2 => 'hiperlan2',
  1828. self::IF_TYPE_PROPBWAP2MP => 'propBWAp2Mp',
  1829. self::IF_TYPE_SONETOVERHEADCHANNEL => 'sonetOverheadChannel',
  1830. self::IF_TYPE_DIGITALWRAPPEROVERHEADCHANNEL => 'digitalWrapperOverheadChannel',
  1831. self::IF_TYPE_AAL2 => 'aal2',
  1832. self::IF_TYPE_RADIOMAC => 'radioMAC',
  1833. self::IF_TYPE_ATMRADIO => 'atmRadio',
  1834. self::IF_TYPE_IMT => 'imt',
  1835. self::IF_TYPE_MVL => 'mvl',
  1836. self::IF_TYPE_REACHDSL => 'reachDSL',
  1837. self::IF_TYPE_FRDLCIENDPT => 'frDlciEndPt',
  1838. self::IF_TYPE_ATMVCIENDPT => 'atmVciEndPt',
  1839. self::IF_TYPE_OPTICALCHANNEL => 'opticalChannel',
  1840. self::IF_TYPE_OPTICALTRANSPORT => 'opticalTransport',
  1841. self::IF_TYPE_PROPATM => 'propAtm',
  1842. self::IF_TYPE_VOICEOVERCABLE => 'voiceOverCable',
  1843. self::IF_TYPE_INFINIBAND => 'infiniband',
  1844. self::IF_TYPE_TELINK => 'teLink',
  1845. self::IF_TYPE_Q2931 => 'q2931',
  1846. self::IF_TYPE_VIRTUALTG => 'virtualTg',
  1847. self::IF_TYPE_SIPTG => 'sipTg',
  1848. self::IF_TYPE_SIPSIG => 'sipSig',
  1849. self::IF_TYPE_DOCSCABLEUPSTREAMCHANNEL => 'docsCableUpstreamChannel',
  1850. self::IF_TYPE_ECONET => 'econet',
  1851. self::IF_TYPE_PON155 => 'pon155',
  1852. self::IF_TYPE_PON622 => 'pon622',
  1853. self::IF_TYPE_BRIDGE => 'bridge',
  1854. self::IF_TYPE_LINEGROUP => 'linegroup',
  1855. self::IF_TYPE_VOICEEMFGD => 'voiceEMFGD',
  1856. self::IF_TYPE_VOICEFGDEANA => 'voiceFGDEANA',
  1857. self::IF_TYPE_VOICEDID => 'voiceDID',
  1858. self::IF_TYPE_MPEGTRANSPORT => 'mpegTransport',
  1859. self::IF_TYPE_SIXTOFOUR => 'sixToFour',
  1860. self::IF_TYPE_GTP => 'gtp',
  1861. self::IF_TYPE_PDNETHERLOOP1 => 'pdnEtherLoop1',
  1862. self::IF_TYPE_PDNETHERLOOP2 => 'pdnEtherLoop2',
  1863. self::IF_TYPE_OPTICALCHANNELGROUP => 'opticalChannelGroup',
  1864. self::IF_TYPE_HOMEPNA => 'homepna',
  1865. self::IF_TYPE_GFP => 'gfp',
  1866. self::IF_TYPE_CISCOISLVLAN => 'ciscoISLvlan',
  1867. self::IF_TYPE_ACTELISMETALOOP => 'actelisMetaLOOP',
  1868. self::IF_TYPE_FCIPLINK => 'fcipLink',
  1869. self::IF_TYPE_RPR => 'rpr',
  1870. self::IF_TYPE_QAM => 'qam',
  1871. self::IF_TYPE_LMP => 'lmp',
  1872. self::IF_TYPE_CBLVECTASTAR => 'cblVectaStar',
  1873. self::IF_TYPE_DOCSCABLEMCMTSDOWNSTREAM => 'docsCableMCmtsDownstream',
  1874. self::IF_TYPE_ADSL2 => 'adsl2',
  1875. self::IF_TYPE_MACSECCONTROLLEDIF => 'macSecControlledIF',
  1876. self::IF_TYPE_MACSECUNCONTROLLEDIF => 'macSecUncontrolledIF',
  1877. self::IF_TYPE_AVICIOPTICALETHER => 'aviciOpticalEther',
  1878. self::IF_TYPE_ATMBOND => 'atmbond'
  1879. );
  1880. /**
  1881. * Get an array of device interface types
  1882. *
  1883. * @see $IF_TYPES
  1884. * @param boolean $translate If true, return the string representation
  1885. * @return array An array of interface types
  1886. */
  1887. public function types( $translate = false )
  1888. {
  1889. $types = $this->getSNMP()->walk1d( self::OID_IF_TYPE );
  1890. if( !$translate )
  1891. return $types;
  1892. return $this->getSNMP()->translate( $types, self::$IF_TYPES );
  1893. }
  1894. /**
  1895. * Returns an associate array of STP port IDs (key) to interface IDs (value)
  1896. *
  1897. * e.g. [22] => 10122
  1898. *
  1899. *
  1900. * @return array Associate array of STP port IDs (key) to interface IDs (value)
  1901. */
  1902. public function bridgeBasePortIfIndexes()
  1903. {
  1904. return $this->getSNMP()->walk1d( self::OID_BRIDGE_BASE_PORT_IF_INDEX );
  1905. }
  1906. }