nl_tokens: Validates for a IPv4 - Mapped IPv6 according to https : // tools . ietf . org / html / rfc4291#section - 2 . 5 . 5
pl_tokens: function isValidIPv4Mapped ( buffer ) { // check the form // |      80 bits   | 16 |   32 bits // +----------------+----+------------- // |0000........0000|FFFF| IPv4 address for ( let i = 0 ; i < buffer . length - 6 ; i ++ ) { if ( buffer [ i ] !== 0 ) { return false ; } } return ! ( <mask> [ 10 ] !== 255 || buffer [ 11 ] !== 255 ) ; }