// Copyright (c) 1999 Brian Wellington (bwelling@xbill.org)
// Portions Copyright (c) 1999 Network Associates, Inc.

package org.xbill.DNS;

import org.xbill.DNS.utils.*;

/**
 * Constants and functions relating to DNS opcodes
 *
 * @author Brian Wellington
 */

public final class Opcode {

private static StringValueTable opcodes = new StringValueTable();

/** A query sent to a server */
public static final byte QUERY		= 0;

/**
 * A message from a primary to a secondary server to initiate a zone transfer
 */
public static final byte NOTIFY		= 4;

/** A dynamic update message */
public static final byte UPDATE		= 5;

static {
	opcodes.put2(QUERY, "QUERY");
	opcodes.put2(NOTIFY, "NOTIFY");
	opcodes.put2(UPDATE, "UPDATE");
}

private
Opcode() {}

/** Converts a numeric Opcode into a String */
public static String
string(int i) {
	String s = opcodes.getString(i);
	return (s != null) ? s : new Integer(i).toString();
}

/** Converts a String representation of an Opcode into its numeric value */
public static byte
value(String s) {
	byte i = (byte) opcodes.getValue(s.toUpperCase());
	if (i >= 0)
		return i;
	try {
		return Byte.parseByte(s);
	}
	catch (Exception e) {
		return (-1);
	}
}

}

@@ -362,30 +362,22 @@
 * A 
-query sent to a serv
+standard qu
 er
+y
  */%0A
@@ -414,16 +414,173 @@
 %09%09= 0;%0A%0A
+/** An inverse query (deprecated) */%0Apublic static final byte IQUERY%09%09= 1;%0A%0A/** A server status request (not used) */%0Apublic static final byte STATUS%09%09= 2;%0A%0A
 /**%0A * A
@@ -776,16 +776,16 @@
 tatic %7B%0A
-
 %09opcodes
@@ -803,24 +803,88 @@
 , %22QUERY%22);%0A
+%09opcodes.put2(QUERY, %22IQUERY%22);%0A%09opcodes.put2(QUERY, %22STATUS%22);%0A
 %09opcodes.put

Add constants and strings for IQUERY and STATUS opcodes.