Browse code

Documentation for the newly added functions

Lucian Balaceanu authored on 25/08/2016 12:09:29
Showing 1 changed files
... ...
@@ -359,6 +359,205 @@ switch($rc) {
359 359
 
360 360
     </section>
361 361
 
362
+    <section id="ipops.f.detailed_ip_type">
363
+      <title>
364
+        <function moreinfo="none">detailed_ip_type (ip, result)</function>
365
+      </title>
366
+
367
+      <para>
368
+        Returns the detailed type of the given IP () (see http://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.txt, http://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.txt, RFC 5735 and RFC 6598: PRIVATE, SHARED, LOOPBACK, IPV4MAP, DISCARD etc).
369
+      </para>
370
+
371
+      <para>Parameters:</para>
372
+
373
+      <itemizedlist>
374
+        <listitem>
375
+          <para>
376
+            <emphasis>ip</emphasis> - String or pseudo-variable containing the IP to evaluate.
377
+          </para>
378
+	</listitem>
379
+        <listitem> 
380
+   	  <para>
381
+            <emphasis>result</emphasis> - String or pseudo-variable containing the detailed type of the IP.
382
+          </para>
383
+          <para>
384
+            <itemizedlist>
385
+              <listitem>  
386
+		<emphasis> IPv4 </emphasis> - PRIVATE, SHARED, LOOPBACK, LINK-LOCAL, RESERVED, TEST-NET, 6TO4-RELAY, MULTICAST, BROADCAST     
387
+ 	      </listitem>
388
+	      <listitem>  
389
+		<emphasis> IPv6 </emphasis> - UNSPECIFIED,  LOOPBACK, IPV4MAP, RESERVED, DISCARD, GLOBAL-UNICAST, TEREDO, BMWG, DOCUMENTATION, ORCHID, 6TO4, UNIQUE-LOCAL-UNICAST, LINK-LOCAL-UNICAST, MULTICAST     
390
+ 	      </listitem>              
391
+  	    </itemizedlist>		
392
+	  </para>	
393
+        </listitem>
394
+      </itemizedlist>
395
+
396
+      <para>Return value:</para>
397
+
398
+      <itemizedlist>
399
+        <listitem>
400
+          <para>
401
+            <emphasis>1</emphasis> - successful operation
402
+          </para>
403
+        </listitem>
404
+        <listitem>
405
+          <para>
406
+            <emphasis>negative value</emphasis> - error occured
407
+          </para>
408
+        </listitem>       
409
+      </itemizedlist>
410
+
411
+      <para>
412
+        This function can be used from ALL ROUTES
413
+      </para>
414
+
415
+      <example>
416
+        <title>
417
+          <function>detailed_ip_type</function> usage
418
+        </title>
419
+        <programlisting format="linespecific">
420
+...
421
+    detailed_ip_type("192.168.1.2","$var(result)");
422
+    xlog("L_ERR","IP address is of detailed type: $var(result) ");
423
+...
424
+        </programlisting>
425
+      </example>
426
+
427
+    </section>
428
+
429
+    <section id="ipops.f.detailed_ipv4_type">
430
+      <title>
431
+        <function moreinfo="none">detailed_ipv4_type (ip, result)</function>
432
+      </title>
433
+
434
+      <para>
435
+        Returns the detailed type of the given IP () (see RFC 5735 and RFC 6598).
436
+      </para>
437
+
438
+      <para>Parameters:</para>
439
+
440
+      <itemizedlist>
441
+        <listitem>
442
+          <para>
443
+            <emphasis>ip</emphasis> - String or pseudo-variable containing the IP to evaluate.
444
+          </para>
445
+	</listitem>
446
+        <listitem> 
447
+   	  <para>
448
+            <emphasis>result</emphasis> - String or pseudo-variable containing the detailed type of the IP.
449
+          </para>
450
+          <para>
451
+            <itemizedlist>
452
+              <listitem>  
453
+		<emphasis> IPv4 </emphasis> - PRIVATE, SHARED, LOOPBACK, LINK-LOCAL, RESERVED, TEST-NET, 6TO4-RELAY, MULTICAST, BROADCAST     
454
+ 	      </listitem>	                 
455
+  	    </itemizedlist>		
456
+	  </para>	
457
+        </listitem>
458
+      </itemizedlist>
459
+
460
+      <para>Return value:</para>
461
+
462
+      <itemizedlist>
463
+        <listitem>
464
+          <para>
465
+            <emphasis>1</emphasis> - successful operation
466
+          </para>
467
+        </listitem>
468
+        <listitem>
469
+          <para>
470
+            <emphasis>negative value</emphasis> - error occured
471
+          </para>
472
+        </listitem>       
473
+      </itemizedlist>
474
+
475
+      <para>
476
+        This function can be used from ALL ROUTES
477
+      </para>
478
+
479
+      <example>
480
+        <title>
481
+          <function>detailed_ipv4_type</function> usage
482
+        </title>
483
+        <programlisting format="linespecific">
484
+...
485
+    detailed_ipv4_type("192.168.1.2","$var(result)");
486
+    xlog("L_ERR","IP address is of detailed type: $var(result) ");
487
+...
488
+        </programlisting>
489
+      </example>
490
+
491
+    </section>	
492
+
493
+    <section id="ipops.f.detailed_ipv6_type">
494
+      <title>
495
+        <function moreinfo="none">detailed_ipv6_type (ip, result)</function>
496
+      </title>
497
+
498
+      <para>
499
+        Returns the detailed type of the given IP () (see http://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.txt, http://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.txt).
500
+      </para>
501
+
502
+      <para>Parameters:</para>
503
+
504
+      <itemizedlist>
505
+        <listitem>
506
+          <para>
507
+            <emphasis>ip</emphasis> - String or pseudo-variable containing the IP to evaluate.
508
+          </para>
509
+	</listitem>
510
+        <listitem> 
511
+   	  <para>
512
+            <emphasis>result</emphasis> - String or pseudo-variable containing the detailed type of the IP.
513
+          </para>
514
+          <para>
515
+            <itemizedlist>
516
+              <listitem>  
517
+		<emphasis> IPv6 </emphasis> - PRIVATE, SHARED, LOOPBACK, LINK-LOCAL, RESERVED, TEST-NET, 6TO4-RELAY, MULTICAST, BROADCAST     
518
+ 	      </listitem>	                 
519
+  	    </itemizedlist>		
520
+	  </para>	
521
+        </listitem>
522
+      </itemizedlist>
523
+
524
+      <para>Return value:</para>
525
+
526
+      <itemizedlist>
527
+        <listitem>
528
+          <para>
529
+            <emphasis>1</emphasis> - successful operation
530
+          </para>
531
+        </listitem>
532
+        <listitem>
533
+          <para>
534
+            <emphasis>negative value</emphasis> - error occured
535
+          </para>
536
+        </listitem>       
537
+      </itemizedlist>
538
+
539
+      <para>
540
+        This function can be used from ALL ROUTES
541
+      </para>
542
+
543
+      <example>
544
+        <title>
545
+          <function>detailed_ipv6_type</function> usage
546
+        </title>
547
+        <programlisting format="linespecific">
548
+...
549
+    detailed_ipv6_type("2001:8d8:7c0:402:217:72:194:30","$var(result)");
550
+    xlog("L_ERR","IP address is of detailed type: $var(result) ");
551
+
552
+    detailed_ipv6_type("[2001:8d8:7c0:402:217:72:194:30]","$var(result)");
553
+    xlog("L_ERR","IP address is of detailed type: $var(result) ");	
554
+...
555
+        </programlisting>
556
+      </example>
557
+
558
+    </section>	
559
+
560
+
362 561
     <section id="ipops.f.compare_ips">
363 562
       <title>
364 563
         <function moreinfo="none">compare_ips (ip1, ip2)</function>