### GSSManager Example: Get mechanisms and set provider preferences Source: https://www.rfc-editor.org/info/rfc8353 Complete example showing how to get available mechanisms, create Oids for Kerberos and SPKM1, and set a provider preference. ```java GSSManager mgr = GSSManager.getInstance(); // What mechs are available to us? Oid[] supportedMechs = mgr.getMechs(); // Set a preference for the provider to be used when support // is needed for the mechanisms: // "1.2.840.113554.1.2.2" and "1.3.6.1.5.5.1.1". Oid krb = new Oid("1.2.840.113554.1.2.2"); Oid spkm1 = new Oid("1.3.6.1.5.5.1.1"); Provider p = (Provider) (new com.foo.security.Provider()); ``` -------------------------------- ### Graphics Loader example: setup, modeset, exq, update Source: https://www.rfc-editor.org/info/rfc186 Example of setting up a display program and executing it multiple times with the Graphics Loader. It shows SETUP, MODESET for auto transmit in ARDS mode, EXQ to execute 10 times, and UPDATE to change a matrix and execute 20 times. ```plaintext SETUP,,0 +-->length,,2000 ; length of display pgm | - ; large output area | | ----- | | ----- +--> ----- | program | ----- | ----- - MODESET,,5 ; auto transmit in ARDS mode 0,,1000+length ; arguments for transmit ; meaning "current contents ; of output area" EXQ,,10 ; execute 10 times, sending ; the data each time UPDATE,,20 ; update, then execute 20 times 8,,address of matrix ; arguments for update, to - ; change a matrix | 8 words - new matrix | _ etc. ``` -------------------------------- ### Elaborate PPS API example: open and create handle Source: https://www.rfc-editor.org/info/rfc2783 Starts a more elaborate PPS API example: opens the device, creates a handle, and declares variables including avail_mode for capability detection. The snippet is truncated in the source; the full example continues beyond the visible portion. ```C int fd; pps_handle_t handle; pps_params_t params; pps_info_t infobuf; int avail_mode; struct timespec timeout; /* Open a file descriptor */ fd = open(PPSfilename, O_RDWR, 0); time_pps_create(fd, &handle); /* * Find out what features are supported */ ``` -------------------------------- ### Peer Example: Establish Connection, Send/Receive Messages, Handle Path Changes Source: https://www.rfc-editor.org/info/rfc9622 Shows how to configure local candidates (host and STUN), create a Preconnection, resolve candidates, add remote candidates, perform rendezvous, send and receive messages, handle path changes by resolving new local endpoints, and close the connection. Includes event handler placeholders for RendezvousDone and PathChange. ```pseudocode // Configure local candidates: a port on the Local Endpoint // and via a Session Traversal Utilities for NAT (STUN) server HostCandidate := NewLocalEndpoint() HostCandidate.WithPort(9876) StunCandidate := NewLocalEndpoint() StunCandidate.WithStunServer(address, port, credentials) LocalCandidates = [HostCandidate, StunCandidate] TransportProperties := // ...Configure transport properties SecurityParameters := // ...Configure security properties Preconnection := NewPreconnection(LocalCandidates, [], // No remote candidates yet TransportProperties, SecurityParameters) // Resolve the LocalCandidates. The Preconnection.Resolve() // call resolves both local and remote candidates; however, // because the remote candidates have not yet been specified, // the ResolvedRemote list returned will be empty and is not // used. ResolvedLocal, ResolvedRemote = Preconnection.Resolve() // Application-specific code goes here to send the ResolvedLocal // list to the peer via some out-of-band signaling channel (e.g., // in a SIP message). ... // Application-specific code goes here to receive RemoteCandidates // (type []RemoteEndpoint, a list of RemoteEndpoint objects) from // the peer via the signaling channel. ... // Add remote candidates and initiate the rendezvous: Preconnection.AddRemote(RemoteCandidates) Preconnection.Rendezvous() Preconnection -> RendezvousDone //---- RendezvousDone event handler begin ---- Connection.Send(messageDataRequest) Connection.Receive() //---- RendezvousDone event handler end ---- Connection -> Received // If new Remote Endpoint candidates are received from the // peer over the signaling channel -- for example, if using // Trickle Interactive Connectivity Establishment (ICE) -- // then add them to the Connection: Connection.AddRemote(NewRemoteCandidates) // On a PathChange event, resolve the Local Endpoint Identifiers to // see if a new Local Endpoint has become available and, if // so, send to the peer as a new candidate and add to the // Connection: Connection -> PathChange<> //---- PathChange event handler begin ---- ResolvedLocal, ResolvedRemote = Preconnection.Resolve() if ResolvedLocal has changed: // Application-specific code goes here to send the // ResolvedLocal list to the peer via the signaling channel ... // Add the new Local Endpoints to the Connection: Connection.AddLocal(ResolvedLocal) //---- PathChange event handler end ---- // Close the Connection in a Receive event handler: Connection.Close() ``` -------------------------------- ### GET /v2/Groups/{id} Source: https://www.rfc-editor.org/info/rfc7644 This endpoint retrieves a specific Group resource by its ID. The example shows the response for the 'Tour Guides' group after a bulk operation. ```APIDOC ## GET /v2/Groups/{id} ### Description This endpoint retrieves a specific Group resource by its ID. The example shows the response for the 'Tour Guides' group after a bulk operation. ### Method GET ### Endpoint /v2/Groups/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the Group resource. ### Response #### Success Response (200) - **schemas** (array of string) - Contains the core Group schema URN. - **id** (string) - The group's unique identifier. - **displayName** (string) - The group's display name. - **meta** (object) - Contains resourceType, created, lastModified, location, and version. - **members** (array of objects) - Each member has value, $ref, and type. #### Response Example { "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"], "id": "e9e30dba-f08f-4109-8486-d5c6a331660a", "displayName": "Tour Guides", "meta": { "resourceType": "Group", "created": "2011-08-01T18:29:49.793Z", "lastModified": "2011-08-01T20:31:02.315Z", "location": "https://example.com/v2/Groups/e9e30dba-f08f-4109-8486-d5c6a331660a", "version": "W/\"lha5bbazU3fNvfe5\"" }, "members": [ { "value": "92b725cd-9465-4e7d-8c16-01f8e146b87a", "$ref": "https://example.com/v2/Users/92b725cd-9465-4e7d-8c16-01f8e146b87a", "type": "User" } ] } ``` -------------------------------- ### SETUP Source: https://www.rfc-editor.org/info/rfc2326 The SETUP method requests the server to allocate resources for a media stream and establish a transport mechanism. The request includes the transport parameters. ```APIDOC ## SETUP ### Description Requests the server to allocate resources for a media stream and establish a transport mechanism. The request includes the transport parameters. ### Method SETUP ### Endpoint Not specified in the source. ### Parameters No parameters are explicitly documented in the source. ### Request Example No request example is provided in the source. ### Response #### Success Response (200) - **Transport** (header) - Contains the transport parameters selected by the server. #### Response Example No response example is provided in the source. ``` -------------------------------- ### NETCONF Reply Example Source: https://www.rfc-editor.org/info/rfc7223 Example NETCONF reply for a device implementing the example data models. Shows the XML structure with interfaces and an interface element. ```xml eth0 ianaift:ethernetCsmacd false ``` -------------------------------- ### SetupOPRFServer Source: https://www.rfc-editor.org/info/rfc9497 Creates an OPRF server context. ```APIDOC ## SetupOPRFServer ### Description Creates an OPRF server context used for executing the online phase of the protocol. ### Method Function ### Endpoint SetupOPRFServer(identifier, skS) ### Parameters - **identifier** - Required - The protocol identifier. - **skS** (Scalar) - Required - The server's private key. ### Output - **OPRFServerContext** - The server context containing the context string and key material. ### Request Example ``` def SetupOPRFServer(identifier, skS): contextString = CreateContextString(modeOPRF, identifier) return OPRFServerContext(contextString, skS) ``` ### Response #### Success Response - **OPRFServerContext** - The server context. ``` -------------------------------- ### MF signal example Source: https://www.rfc-editor.org/info/rfc3064 Example of an MF signal or event with digit symbols and a start signal. ```text inf(k0, 5,5,5,1,2,3,4, s0) ``` -------------------------------- ### GET /costmap/num/routingcost Source: https://www.rfc-editor.org/info/rfc7285 Example of a GET request to retrieve a cost map with numerical routing costs. ```APIDOC ## GET /costmap/num/routingcost ### Description Retrieves a cost map with numerical routing costs between PIDs. The response includes a cost map and metadata with dependent version tags and cost type. ### Method GET ### Endpoint /costmap/num/routingcost ### Parameters #### Headers - **Accept** (string) - Required - Must include `application/alto-costmap+json` and `application/alto-error+json`. ### Request Example ``` GET /costmap/num/routingcost HTTP/1.1 Host: alto.example.com Accept: application/alto-costmap+json,application/alto-error+json ``` ### Response #### Success Response (200) - **meta** (object) - Contains `dependent-vtags` and `cost-type`. - **cost-map** (object) - Maps PIDs to objects with cost values. #### Response Example ``` { "meta" : { "dependent-vtags" : [ {"resource-id": "my-default-network-map", "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" } ], "cost-type" : {"cost-mode" : "numerical", "cost-metric": "routingcost" } }, "cost-map" : { "PID1": { "PID1": 1, "PID2": 5, "PID3": 10 }, "PID2": { "PID1": 5, "PID2": 1, "PID3": 15 }, "PID3": { "PID1": 20, "PID2": 15 } } } ``` ``` -------------------------------- ### GET example for edge 0 to 101 Source: https://www.rfc-editor.org/info/rfc9569 Example GET request for the update item on edge 0 to 101. The Accept header lists the media types the client can handle, including the costmap and error types. ```http GET /tips/2718281828/ug/0/101 HTTP/1.1 Host: alto.example.com Accept: application/alto-costmap+json, \ application/alto-error+json ``` -------------------------------- ### LIST CMD su700 example Source: https://www.rfc-editor.org/info/rfc9271 Example response for the command LIST CMD su700, showing two Instant Commands: load.on and test.panel.start. ```text BEGIN LIST CMD su700 CMD su700 load.on CMD su700 test.panel.start ... END LIST CMD su700 ``` -------------------------------- ### GET /Users/{id} Source: https://www.rfc-editor.org/info/rfc7644 Example of a GET request for a non-existent resource, showing the 404 error response. ```APIDOC ## GET /Users/{id} ### Description Retrieves a SCIM resource by its identifier. If the resource does not exist, the server returns a 404 Not Found error. ### Method GET ### Endpoint /Users/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The resource identifier. ### Response #### Success Response (200 OK) - **schemas** (array) - SCIM schema URIs. - **id** (string) - The resource identifier. - **meta** (object) - Metadata. - **userName** (string) - The username. #### Error Response (404 Not Found) - **schemas** (array) - Error schema URI. - **detail** (string) - Error description. - **status** (string) - HTTP status code. #### Response Example (Error) { "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"], "detail": "Resource 2819c223-7f76-453a-919d-413861904646 not found", "status": "404" } ``` -------------------------------- ### Build and run xnetload Source: https://www.rfc-editor.org/info/rfc1470 Commands to build, install, and run xnetload. Run 'xmkmf' and 'make' to compile, then as root run 'make install' and 'make install.man'. Start the etherd daemon with '/usr/etc/rpc.etherd le0 &' (must be root), then launch xnetload with './xnetload -hl red host &'. ```shell xmkmf make ``` ```shell make install make install.man ``` ```shell /usr/etc/rpc.etherd le0 & ``` ```shell ./xnetload -hl red host & ``` -------------------------------- ### GET /stored-queries/4815162342 Source: https://www.rfc-editor.org/info/rfc10008 Example of a GET request to the stored query URI, demonstrating conditional retrieval with If-Modified-Since. ```APIDOC ## GET /stored-queries/4815162342 ### Description Retrieves the stored result of a previous QUERY request. The URI is assigned by the server as the equivalent resource for the query. Conditional requests can be used to avoid resending the query content. ### Method GET ### Endpoint /stored-queries/4815162342 ### Parameters #### Headers - **Host** (string) - Required - The host of the server. - **Date** (string) - Required - The date and time of the request. - **Accept** (string) - Required - The media type of the response (e.g., text/csv). - **If-Modified-Since** (string) - Optional - Used for conditional requests; the server returns 304 if the resource has not changed since the given date. ### Request Example ``` GET /stored-queries/4815162342 HTTP/1.1 Host: example.org Date: Sun, 21, Sep 2025, 12:08:00 GMT Accept: text/csv If-Modified-Since: Sun, 31 Aug 2025, 00:00:00 GMT ``` ### Response #### Success Response (200) - **Content-Type** (string) - Media type of the response body. - **Last-Modified** (string) - Last modification date of the resource. - **Vary** (string) - Headers used for content negotiation. - Body: CSV data with query results. #### Response Example ``` HTTP/1.1 200 OK Date: Sun, 21, Sep 2025, 12:08:00 GMT Content-Type: text/csv Last-Modified: Thu, 18 Sep 2025, 19:56:00 GMT Vary: Accept-Query, Content-Encoding, Content-Type decade, total, with errata, % with errata, average page count 1960, 26, 5, 19.2, 5.3 1970, 666, 18, 2.7, 6.1 1980, 376, 44, 11.7, 23.4 1990, 1593, 269, 16.9, 25.5 2000, 2888, 1048, 36.3, 27.3 2010, 2954, 895, 30.3, 26.1 2020, 1133, 230, 20.3, 26.2 ``` ``` -------------------------------- ### BITFTP example: retrieve two files Source: https://www.rfc-editor.org/info/rfc1580 Commands to retrieve the README and how.to.email.guide files from the same directory, sent via e-mail to BITFTP. ```text ftp nic.sura.net user anonymous cd pub/nic/network.service.guides get README get how.to.email.guide quit ``` -------------------------------- ### FTP session example: login, help, and directory listing Source: https://www.rfc-editor.org/info/rfc2151 This is a sample FTP session using MultiNet for VMS, showing login to nic.ddn.mil, using the help command, and listing directory contents. It illustrates the use of commands like 'dir', 'cd', 'get', 'put', 'close', and 'quit'. Note that different FTP packages may have different commands and behaviors. ```text **SMCVAX$ ftp nic.ddn.mil SMCVAX.SMCVT.EDU MultiNet FTP user process 3.4(111) Connection opened (Assuming 8-bit connections) <*****Welcome to the DOD Network Information Center***** < *****Login with username "anonymous" and password "guest" **Username: anonymous help type TYPE Set the transfer type to type. Format TYPE type Additional information available: Parameters Example Restrictions **TYPE Subtopic? parameters TYPE Parameters type Specify a value of ASCII, BACKUP, BINARY, IMAGE or LOGICAL- BYTE. Use TYPE ASCII (the default) for transferring text files. Use TYPE BACKUP to set the transfer type to IMAGE and write the local file with 2048-byte fixed length records. Use this command to transfer VAX/VMS BACKUP save sets. ``` -------------------------------- ### IVR dialogstart examples with connection and conference Source: https://www.rfc-editor.org/info/rfc6231 Two example IVR dialog start requests. The first starts a dialog on a connection with a prompt, a collect of up to 2 digits, and a DTMF subscription. The second starts a dialog on a conference with a record of 384000 seconds and restricts the media stream to audio receive-only. ```XML ``` ```XML ``` -------------------------------- ### IRC mask examples: a?c and a*c Source: https://www.rfc-editor.org/info/rfc2812 Examples of IRC mask patterns: 'a?c' matches any three-character string starting with 'a' and ending with 'c'; 'a*c' matches any string of at least two characters starting with 'a' and ending with 'c'. ```text a?c ; Matches any string of 3 characters in length starting with "a" and ending with "c" ``` ```text a*c ; Matches any string of at least 2 characters in length starting with "a" and ending with "c" ``` -------------------------------- ### BITFTP example: retrieve file and list directory Source: https://www.rfc-editor.org/info/rfc1580 Commands to retrieve the file how.to.ftp.guide from the /pub/nic/network.service.guides directory at nic.sura.net and list its contents, sent by e-mail to BITFTP. ```text ftp nic.sura.net user anonymous cd pub/nic/network.service.guides get how.to.ftp.guide dir quit ``` -------------------------------- ### Example #5: Options available Source: https://www.rfc-editor.org/info/rfc3887 Shows a multi-line response listing available options, including 'starttls' and vendor-specific options, ending with a period. ```text S: +OK+/MTQP MTQP server ready S: starttls S: vnd.com.example.option2 with parameters private to example.com S: vnd.com.example.option3 with a very long S: list of parameters S: . ``` -------------------------------- ### Example Code Source: https://www.rfc-editor.org/info/rfc8353 Example code showing how to use GSSManager to get available mechanisms and set provider preferences. ```APIDOC ## Example Code ### Description This example demonstrates how to use the GSSManager to get available mechanisms and set provider preferences for specific mechanisms. ### Example Code ```java GSSManager mgr = GSSManager.getInstance(); // What mechs are available to us? Oid[] supportedMechs = mgr.getMechs(); // Set a preference for the provider to be used when support // is needed for the mechanisms: // "1.2.840.113554.1.2.2" and "1.3.6.1.5.5.1.1". Oid krb = new Oid("1.2.840.113554.1.2.2"); Oid spkm1 = new Oid("1.3.6.1.5.5.1.1"); Provider p = (Provider) (new com.foo.security.Provider()); ``` ``` -------------------------------- ### GET /pub/WWW/ Source: https://www.rfc-editor.org/info/rfc2068 Example of an HTTP GET request that includes the required Host header field, as specified in RFC 2068. ```APIDOC ## [GET] /pub/WWW/ ### Description A request to retrieve a resource from the origin server, including the Host header field as required by HTTP/1.1. ### Method GET ### Endpoint /pub/WWW/ ### Parameters #### Request Headers - **Host** (string) - Required - The Internet host and port number of the resource being requested, as obtained from the original URL. For example, `www.w3.org`. ### Request Example ``` GET /pub/WWW/ HTTP/1.1 Host: www.w3.org ``` ### Response #### Success Response (200) - **entity** - The requested resource content. #### Error Response (400) - **status** (integer) - 400 Bad Request, returned when the Host header field is missing in an HTTP/1.1 request message. ``` -------------------------------- ### Example: XMKD failure when directory already exists Source: https://www.rfc-editor.org/info/rfc775 Example of attempting to create an existing directory, resulting in an access denied error reply. ```ftp CWD /usr/dm 200 directory changed to /usr/dm XMKD child 521-"/usr/dm/child" directory already exists; 521 taking no action. ``` -------------------------------- ### GET {/service-prefix}/zones{/tzid}{?start,end} Source: https://www.rfc-editor.org/info/rfc7808 The get action retrieves time zone data for a specific time zone identifier. It supports optional start and end parameters to request truncated data for a specific time range. ```APIDOC ## GET {/service-prefix}/zones{/tzid}{?start,end} ### Description This action retrieves the time zone data for a specific time zone identifier. Optional start and end parameters can be used to request a truncated version of the data covering a specific time range. ### Method GET ### Endpoint {/service-prefix}/zones{/tzid}{?start,end} ### Parameters #### Path Parameters - **tzid** (string) - Required - The time zone identifier (e.g., "America/New_York"). #### Query Parameters - **start** (string) - Optional - The start of the time range for truncated data. - **end** (string) - Optional - The end of the time range for truncated data. ### Response The response contains the time zone data for the specified identifier, possibly truncated to the requested range. ``` -------------------------------- ### SetupPOPRFServer Source: https://www.rfc-editor.org/info/rfc9497 Creates a POPRF server context. ```APIDOC ## SetupPOPRFServer ### Description Creates a POPRF server context used for executing the online phase of the protocol. ### Method Function ### Endpoint SetupPOPRFServer(identifier, skS) ### Parameters - **identifier** - Required - The protocol identifier. - **skS** (Scalar) - Required - The server's private key. ### Output - **POPRFServerContext** - The server context containing the context string and key material. ### Request Example ``` def SetupPOPRFServer(identifier, skS): contextString = CreateContextString(modePOPRF, identifier) return POPRFServerContext(contextString, skS) ``` ### Response #### Success Response - **POPRFServerContext** - The server context. ``` -------------------------------- ### VERSION command examples Source: https://www.rfc-editor.org/info/rfc1459 Two examples of the VERSION command. The first shows a message from user Wiz to check the version of a server matching the mask "*.se". The second checks the version of the server "tolsun.oulu.fi". ```irc :Wiz VERSION *.se ``` ```irc VERSION tolsun.oulu.fi ``` -------------------------------- ### SNMP Get example using newPDU, writeVar, snmpSend, and readVar Source: https://www.rfc-editor.org/info/rfc4011 Example of using newPDU, writeVar, snmpSend, and readVar to perform an SNMP Get operation on multiple variables. The PDU is allocated, varbinds are added, the PDU is sent, and the response is read. ```javascript var pdu = newPDU(); var nVars = 0, oid, type, value; writeVar(pdu, nVars++, "sysDescr.0", "", Null); writeVar(pdu, nVars++, "sysOID.0", "", Null); writeVar(pdu, nVars++, "ifNumber.0", "", Null); if (snmpSend(pdu, nVars, Get, pdu, nVars)) return; readVar(pdu, 0, oid, value, type); readVar(pdu, 1, oid, value, type); readVar(pdu, 2, oid, value, type); ... ``` -------------------------------- ### SETUP Source: https://www.rfc-editor.org/info/rfc2326 The SETUP method initializes the transport mechanism for a media stream. It specifies the transport parameters acceptable to the client, and the server responds with the selected parameters and a session identifier. ```APIDOC ## SETUP rtsp://example.com/foo/bar/baz.rm ### Description Sets up the transport mechanism for streaming media. The client specifies acceptable transport parameters, and the server responds with the selected parameters and a session identifier. ### Method SETUP ### Endpoint rtsp://example.com/foo/bar/baz.rm ### Parameters #### Request Headers - **CSeq** (integer) - Required - Sequence number for the request. - **Transport** (string) - Required - Transport parameters acceptable to the client, e.g., `RTP/AVP;unicast;client_port=4588-4589`. ### Request Example ``` SETUP rtsp://example.com/foo/bar/baz.rm RTSP/1.0 CSeq: 302 Transport: RTP/AVP;unicast;client_port=4588-4589 ``` ### Response #### Success Response (200 OK) - **CSeq** (integer) - Echo of the request sequence number. - **Date** (string) - Server date. - **Session** (string) - Session identifier generated by the server. - **Transport** (string) - Transport parameters selected by the server, including server_port. #### Response Example ``` RTSP/1.0 200 OK CSeq: 302 Date: 23 Jan 1997 15:35:06 GMT Session: 47112344 Transport: RTP/AVP;unicast;client_port=4588-4589;server_port=6256-6257 ``` ### Error Handling - **455 Method Not Valid In This State** - Returned if the server does not allow changing transport parameters for a stream that is already playing. - **459 Aggregate Operation Not Allowed** - Returned if a SETUP request includes a session identifier and the server cannot bundle the setup into the existing session. ``` -------------------------------- ### GET /.well-known/est/csrattrs Source: https://www.rfc-editor.org/info/rfc7030 Example of a valid /csrattrs exchange, showing the HTTP GET request and the server's response with suggested attributes. ```APIDOC ## GET /.well-known/est/csrattrs ### Description Retrieves the suggested certificate signing request (CSR) attributes from the EST server. The client authenticates using an existing certificate issued by the CA. ### Method GET ### Endpoint /.well-known/est/csrattrs ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example GET /.well-known/est/csrattrs HTTP/1.1 User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 Host: 192.0.2.1:8085 Accept: */* ### Response #### Success Response (200) - Content-Type: application/csrattrs - Content-Transfer-Encoding: base64 - Body: Base64-encoded CSR attributes #### Response Example HTTP/1.1 200 OK Status: 200 OK Content-Type: application/csrattrs Content-Transfer-Encoding: base64 Content-Length: 171 MHwGBysGAQEBARYwIgYDiDcBMRsTGVBhcnNlIFNFVCBhcyAyLjk5OS4xIGRhdGEG CSqGSIb3DQEJBzAsBgOINwIxJQYDiDcDBgOINwQTGVBhcnNlIFNFVCBhcyAyLjk5 OS4yIGRhdGEGCSskAwMCCAEBCwYJYIZIAWUDBAIC ``` -------------------------------- ### set command example Source: https://www.rfc-editor.org/info/rfc2378 Example of the 'set' command with verbose=off and then without arguments, showing the server's response with the current settings. ```text C: set verbose=off S: 200:Done. C: set S: -200:echo:off S: -200:limit:2 S: -200:charset:iso-8859-1 S: -200:verbose:off S: -200:addonly:off S: -200:nolog:off S: -200:external:on S: 200:Done. ``` -------------------------------- ### GET Request (Figure 29) Source: https://www.rfc-editor.org/info/rfc9530 HTTP/1.1 GET request to /items/123. This request is used in the example of a chunked response with Repr-Digest as a trailer field. ```http GET /items/123 HTTP/1.1 Host: foo.example ``` -------------------------------- ### login command example Source: https://www.rfc-editor.org/info/rfc2378 Example of the 'login' command with an alias, showing the server's challenge response. ```text C: login foo S: 301:,:P"_Y$ONU%"SDUQ6&^`ZZ'?*#Y`A_.Z/A>?@SH>*- ``` -------------------------------- ### NETCONF with for Source: https://www.rfc-editor.org/info/rfc4741 Example response to a operation, showing the structure of the element with a sample interface statistics subtree. ```XML eth0 45621 774344 ``` -------------------------------- ### GSSContext Initiator Example (Partial) Source: https://www.rfc-editor.org/info/rfc8353 Example code from RFC 8353 demonstrating the usage of the GSSContext interface for the initiating peer. It shows GSSManager instantiation, creating a target name using NT_HOSTBASED_SERVICE, creating a context with default mechanism and credentials, setting desired flags (confidentiality, mutual authentication, replay detection, sequence detection), and starting context establishment with an empty input token. The example is truncated in the source and continues on the next page. ```java GSSManager mgr = GSSManager.getInstance(); // start by creating the name for a service entity GSSName targetName = mgr.createName("service@host", GSSName.NT_HOSTBASED_SERVICE); // create a context using default credentials for the above entity // and the implementation-specific default mechanism GSSContext context = mgr.createContext(targetName, null, /* default mechanism */ null, /* default credentials */ GSSContext.INDEFINITE_LIFETIME); // set desired context options - all others are "false" by default context.requestConf(true); context.requestMutualAuth(true); context.requestReplayDet(true); context.requestSequenceDet(true); // establish a context between peers - using byte arrays byte[] inTok = new byte[0]; ``` -------------------------------- ### Key Distribution Request-Response Example (CoAP GET /ace-group/g1) Source: https://www.rfc-editor.org/info/rfc9594 Example of a CoAP GET request to retrieve group keying material and the corresponding 2.05 response with a CBOR payload containing 'gkty', 'key', and 'num' parameters. The request uses Uri-Path 'ace-group' and 'g1'. ```coap Request: Header: GET (Code=0.01) Uri-Host: "kdc.example.com" Uri-Path: "ace-group" Uri-Path: "g1" Response: Header: Content (Code=2.05) Content-Format: 261 (application/ace-groupcomm+cbor) Payload (in CBOR diagnostic notation): { / gkty / 7: 65600, / key / 8: h'73657373696f6e6b6579', / num / 9: 12 } ``` -------------------------------- ### SetupOPRFClient Source: https://www.rfc-editor.org/info/rfc9497 Creates an OPRF client context. ```APIDOC ## SetupOPRFClient ### Description Creates an OPRF client context used for executing the online phase of the protocol. ### Method Function ### Endpoint SetupOPRFClient(identifier) ### Parameters - **identifier** - Required - The protocol identifier. ### Output - **OPRFClientContext** - The client context containing the context string. ### Request Example ``` def SetupOPRFClient(identifier): contextString = CreateContextString(modeOPRF, identifier) return OPRFClientContext(contextString) ``` ### Response #### Success Response - **OPRFClientContext** - The client context. ``` -------------------------------- ### GET command examples: success, 151 error, 150 error Source: https://www.rfc-editor.org/info/rfc1856 Example GET command exchanges. The first shows a successful retrieval with a 951 response and data stream. The second shows a 151 error for an unsupported encoding type. The third shows a 150 error when data disappears between SELECT and GET; the client must discard all received data on any error. ```text >GET ABC 1404 <951 "OK, here it comes!" GET ABC STRONG-CRYPT <151 "Sorry, that encoding not available here" ``` ```text >GET ABC 1404 <951 "OK, here it comes!" 0, length of the WAR area (must be at least twice the maximum number of visible line segments). If A1 = 0, new length of the WAR area. ### Behavior - If A1 > 0: previous display program is forgotten, new display program is read (A1 words). - If A1 = 0: WAR area length is changed to A2. - Error condition 2 if A1 or A2 is negative. - Acknowledge message sent unless suppressed (see MODESET). ``` -------------------------------- ### GET to Retrieve Installed Vendor Attack Mapping Details Source: https://www.rfc-editor.org/info/rfc9244 GET request to retrieve installed vendor attack mapping details maintained by the DOTS server. The request uses the RESTCONF protocol with the ietf-dots-data-channel and ietf-dots-mapping modules, specifying the dots-client identifier and content=all query parameter. ```http GET /restconf/data/ietf-dots-data-channel:dots-data\ /dots-client=dz6pHjaADkaFTbjr0JGBpw\ /ietf-dots-mapping:vendor-mapping?\ content=all HTTP/1.1 Host: example.com Accept: application/yang-data+json ``` -------------------------------- ### GET /rd-lookup/res (Resource Lookup) Source: https://www.rfc-editor.org/info/rfc9176 This example shows a client performing a resource lookup with the example resource lookup locations discovered in Figure 5. ```APIDOC ## GET /rd-lookup/res ### Description Performs a resource lookup for resources with a specific resource type (rt) attribute. ### Method GET ### Endpoint /rd-lookup/res ### Parameters #### Query Parameters - **rt** (string) - Required - The resource type to filter by. ### Request Example ``` GET /rd-lookup/res?rt=tag:example.org,2020:temperature ``` ### Response #### Success Response (2.05 Content) - **Payload** (string) - A CoRE Link Format payload containing the matching resources. #### Response Example ``` 2.05 Content Payload: ; rt="tag:example.org,2020:temperature" ``` ``` -------------------------------- ### CONNECT command example Source: https://www.rfc-editor.org/info/rfc2812 Example of the CONNECT command with a target server and port, including an inline comment explaining the action. ```IRC CONNECT tolsun.oulu.fi 6667 ; Command to attempt to connect local server to tolsun.oulu.fi on port 6667 ``` -------------------------------- ### FTP session example: local commands and actions Source: https://www.rfc-editor.org/info/rfc454 This example shows a sample FTP session with a user's local commands and the corresponding actions taken by the FTP client and server. It includes commands for connecting, retrieving and storing files, changing transfer type, and terminating the session. The example demonstrates the protocol's command and response sequence, including error handling (e.g., '451 Access denied'). ```plaintext ftp (host) multics CR ICP to HOST S, socket 3, establishing TELNET connections. username Doe CR USER Doe CRLF ----> <---- 330 password CRLF password mumble CR PASS mumble CRLF ----> <---- 230 Doe logged in. CRLF retrieve (local type) ASCII CR (local pathname) test 1 CR User-FTP opens local file in ASCII. (for.pathname) test.p11 CR RETR test.p11 CRLF <---- 255 SOCK 1233 CRLF Server makes data connection to (U+4). <---- 250 File transfer starts CRLF <---- 252 File transfer complete CRLF type ImageCR TYPE I CRLF ----> <---- 200 Command OK CRLF byte 36CR BYTE 36 CRLF ----> <---- 200 Command OK CRLF store (local type) image CR (local pathname) file dump CR User-FTP opens local file in Image. (for.pathname) >udd>cn>fd CR STOR >udd>cn>fd CRLF ----> <---- 451 Access denied CRLF terminate <---- 231 Doe logged out CRLF Server closes all connections. ``` -------------------------------- ### GET renewal information for example certificate Source: https://www.rfc-editor.org/info/rfc9773 Example unauthenticated GET request to the server's renewalInfo URL for the certificate with AKI keyIdentifier bytes 69:88:5B:6B:87:46:40:41:E1:B3:7B:84:7B:A0:AE:2C:DE:01:C8:D4 and serial number bytes 00:87:65:43:21. The unique identifier is aYhba4dGQEHhs3uEe6CuLN4ByNQ.AIdlQyE. ```http GET /renewal-info/aYhba4dGQEHhs3uEe6CuLN4ByNQ.AIdlQyE HTTP/1.1 Host: acme.example.com Accept: application/json ``` -------------------------------- ### add command example Source: https://www.rfc-editor.org/info/rfc2378 Example of the add command. Requires login and full Hero privileges. Adds a new entry with the specified fields. ```text C: add name="doe john" id="123456789" alias="j-doe" S: 200:Ok. ``` -------------------------------- ### GET request for shift-buffer content Source: https://www.rfc-editor.org/info/rfc8673 The client requests a range starting at the current accessible start. The server returns the currently available bytes immediately and then aggregated/live data. ```HTTP GET /resource HTTP/1.1 Host: example.com Range: bytes=1020000-999999999999 ``` ```HTTP 206 Partial Content Content-Range: bytes 1020000-999999999999/* ``` -------------------------------- ### SetupVOPRFServer Source: https://www.rfc-editor.org/info/rfc9497 Creates a VOPRF server context. ```APIDOC ## SetupVOPRFServer ### Description Creates a VOPRF server context used for executing the online phase of the protocol. ### Method Function ### Endpoint SetupVOPRFServer(identifier, skS) ### Parameters - **identifier** - Required - The protocol identifier. - **skS** (Scalar) - Required - The server's private key. ### Output - **VOPRFServerContext** - The server context containing the context string and key material. ### Request Example ``` def SetupVOPRFServer(identifier, skS): contextString = CreateContextString(modeVOPRF, identifier) return VOPRFServerContext(contextString, skS) ``` ### Response #### Success Response - **VOPRFServerContext** - The server context. ```