| 
									
										
										
										
											2010-07-20 14:03:54 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-20 16:50:16 +00:00
										 |  |  | if (empty($os)) | 
					
						
							| 
									
										
										
										
											2011-03-14 19:16:40 +00:00
										 |  |  | { | 
					
						
							|  |  |  |   if (strstr($sysDescr, "Cisco Internetwork Operating System Software")) { $os = "ios"; } | 
					
						
							|  |  |  |   else if (strstr($sysDescr, "IOS (tm)")) { $os = "ios"; } | 
					
						
							|  |  |  |   else if (strstr($sysDescr, "Cisco IOS Software")) { $os = "ios"; } | 
					
						
							| 
									
										
										
										
											2012-05-29 11:25:25 +00:00
										 |  |  |   else if (strstr($sysDescr, "Global Site Selector")) { $os = "ios"; } | 
					
						
							| 
									
										
										
										
											2011-03-16 17:52:29 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-14 19:16:40 +00:00
										 |  |  |   if (strstr($sysDescr, "IOS-XE")) { $os = "iosxe"; } | 
					
						
							|  |  |  |   if (strstr($sysDescr, "IOS XR")) { $os = "iosxr"; } | 
					
						
							| 
									
										
										
										
											2010-07-20 14:03:54 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-20 16:50:16 +00:00
										 |  |  | # Fallback case
 | 
					
						
							|  |  |  | # If we don't have an OS yet and if the object is in Cisco tree it's most likely an IOS device
 | 
					
						
							|  |  |  | #if (empty($os) and substr($sysObjectId, 0, 17) == ".1.3.6.1.4.1.9.1.") { $os = "ios"; }
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ?>
 |