// Path: src/main/java/hk/miru/javapgm/Preconditions.java
// public static void checkArgument (boolean expression) {
// 	if (!expression) {
// 		throw new IllegalArgumentException();
// 	}
// }
// 
// Path: src/main/java/hk/miru/javapgm/Preconditions.java
// public static <T> T checkNotNull (T reference) {
// 	if (reference == null) {
// 		throw new NullPointerException();
// 	}
// 	return reference;
// }


import static hk.miru.javapgm.Preconditions.checkArgument;
import static hk.miru.javapgm.Preconditions.checkNotNull;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;
			break;
		case Packet.AFI_IP6:
			opt_nak_list_offset = NAK6_OPTIONS_OFFSET;
			break;
		default:
			return sqn_list;
		}
                OptionHeader optHeader = new OptionHeader (this._skb, this._offset + opt_nak_list_offset);
                if (!optHeader.isLengthOption()) {
                        LogManager.getLogger (Nak.class.getName()).trace (NETWORK_MARKER, "Malformed NAK rejected on unexpected primary PGM option type.");
                        return sqn_list;
                }
                OptionLength optLength = new OptionLength (this._skb, optHeader.getOffset());
                OptionNakList optNakList = null;
                do {
                        optHeader = new OptionHeader (this._skb, optHeader.getOffset() + optHeader.getLength());
                        if (optHeader.isNakListOption()) {
                                optNakList = new OptionNakList (this._skb, optHeader.getOffset(), optHeader.getLength());
                                break;
                        }
                } while (!optHeader.isLastOption());
                if (null != optNakList) {
                        sqn_list = new SequenceNumber[optNakList.getSequenceCount()];
            		for (int i = 0; i < sqn_list.length; i++)
                                sqn_list[i] = optNakList.getOptionSequence (i);
                }
                return sqn_list;
        }
        
	public void setNakListOption (SequenceNumber[] sqn_list) {
// Path: src/main/java/hk/miru/javapgm/Preconditions.java
// public static void checkArgument (boolean expression) {
// 	if (!expression) {
// 		throw new IllegalArgumentException();
// 	}
// }
// 
// Path: src/main/java/hk/miru/javapgm/Preconditions.java
// public static <T> T checkNotNull (T reference) {
// 	if (reference == null) {
// 		throw new NullPointerException();
// 	}
// 	return reference;
// }


// Path: src/main/java/hk/miru/javapgm/Nak.java
import static hk.miru.javapgm.Preconditions.checkArgument;
import static hk.miru.javapgm.Preconditions.checkNotNull;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;

			break;
		case Packet.AFI_IP6:
			opt_nak_list_offset = NAK6_OPTIONS_OFFSET;
			break;
		default:
			return sqn_list;
		}
                OptionHeader optHeader = new OptionHeader (this._skb, this._offset + opt_nak_list_offset);
                if (!optHeader.isLengthOption()) {
                        LogManager.getLogger (Nak.class.getName()).trace (NETWORK_MARKER, "Malformed NAK rejected on unexpected primary PGM option type.");
                        return sqn_list;
                }
                OptionLength optLength = new OptionLength (this._skb, optHeader.getOffset());
                OptionNakList optNakList = null;
                do {
                        optHeader = new OptionHeader (this._skb, optHeader.getOffset() + optHeader.getLength());
                        if (optHeader.isNakListOption()) {
                                optNakList = new OptionNakList (this._skb, optHeader.getOffset(), optHeader.getLength());
                                break;
                        }
                } while (!optHeader.isLastOption());
                if (null != optNakList) {
                        sqn_list = new SequenceNumber[optNakList.getSequenceCount()];
            		for (int i = 0; i < sqn_list.length; i++)
                                sqn_list[i] = optNakList.getOptionSequence (i);
                }
                return sqn_list;
        }
        
	public void setNakListOption (SequenceNumber[] sqn_list) {
                checkArgument (sqn_list.length > 0 && sqn_list.length <= 62);