# SendGetBulkRequest Method

Send a GetBulkRequest packet.

## Object Oriented Interface

public function doSendGetBulkRequest($nonrepeaters, $maxrepetitions);

## Procedural Interface

ipworkssnmp_snmptcpmgr_do_sendgetbulkrequest($res, $nonrepeaters, $maxrepetitions);

## Remarks

Sends a GetBulkRequest packet. This is only available for SNMP versions 2 and 3.

*NonRepeaters* specifies the number of variables for which a single lexicographic
successor is to be returned.

*MaxRepetitions* specifies the number of lexicographic successors to be returned
for variables other than those in the *NonRepeaters* list.

The object identifiers, types, and values for the request are taken from the
__Objects__ collection.

A GetBulkRequest is very similar to a GetNextRequest, the difference is that Getbulk performs a continuous GetNext operation based on the
*MaxRepitions* value. The *NonRepeaters* value will determine the number of __Objects__ for which a simple GetNext operation should be
performed. For the remaining variables, a continuous GetNext operation is performed based on the *MaxRepitions* value.

So if you send a request containing X objects, the agent will perform N simple GetNext operations and M continuous GetNext operations X - N times. With
X being the number of objects received, N being the number of *NonRepeaters*, and M being the number of *MaxRepitions*. Thus the SNMPMgr is
expecting to receive N + M x (X - N) objects, assuming that each object has M successors.

**Example (Sending a GetBulk Request)**

SNMPControl.RemoteHost = "MyAgent" SNMPControl.ObjCount = 2 SNMPControl.ObjId(0) = "1.3.6.1.2.1.1.1.0" SNMPControl.objId(1) = "1.3.6.1.2.1.1.3.0" SNMPControl.SendGetBulkRequest(1,4)

The code sample above will send a GetBulkRequest with 1 non repeater, and a maxrepetitions of 4. Since there is only 1 non repeater, only one ObjID will "not repeat" and will only return one successor. The rest of the ObjID's (in this case, only 1) will return 4 successors. This particular example will return the following ObjID's:

1 | 1.3.6.1.2.1.1.2.0 |

2 | 1.3.6.1.2.1.1.4.0 |

3 | 1.3.6.1.2.1.1.5.0 |

4 | 1.3.6.1.2.1.1.6.0 |

5 | 1.3.6.1.2.1.1.7.0 |