'\" te .\" Copyright (c) 20066 Sun Microsystems, Inc. All Rights Reserved .TH SSAOidCmp 3SNMP "30 Apr 2006" "SunOS 5.11" "SNMP Library Functions" .SH NAME SSAOidCmp, SSAOidCpy, SSAOidDup, SSAOidFree, SSAOidInit, SSAOidNew, SSAOidString, SSAOidStrToOid, SSAOidZero \- Sun Solstice Enterprise Agent OID helper functions .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lssasnmp\fR [ \fIlibrary\fR .. ] #include \fBint\fR \fBSSAOidCmp\fR(\fBOid *\fR\fIoid1\fR, \fBOid *\fR\fIoid2\fR); .fi .LP .nf \fBint\fR \fBSSAOidCpy\fR(\fBOid *\fR\fIoid1\fR, \fBOid *\fR\fIoid2\fR, \fBchar *\fR\fIerror_label\fR); .fi .LP .nf \fBOid *\fR\fBSSAOidDup\fR(\fBOid *\fR\fIoid\fR, \fBchar *\fR\fIerror_label\fR); .fi .LP .nf \fBvoid\fR \fBSSAOidFree\fR(\fBOid *\fR\fIoid\fR); .fi .LP .nf \fBint\fR \fBSSAOidInit\fR(\fBOid *\fR\fIoid\fR, \fBSubid *\fR\fIsubids\fR, \fBint\fR \fIlen\fR, \fBchar *\fR\fIerror_label\fR); .fi .LP .nf \fBOid *\fR\fBSSAOidNew\fR(); .fi .LP .nf \fBchar *\fR\fBSSAOidString\fR(\fBOid *\fR\fIoid\fR); .fi .LP .nf \fBOid *\fR\fBSSAOidStrToOid\fR(\fBchar*\fR \fIname\fR, \fBchar *\fR\fIerror_label\fR); .fi .LP .nf \fBvoid\fR \fBSSAOidZero\fR(\fBOid *\fR\fIoid\fR); .fi .SH DESCRIPTION .sp .LP The \fBSSAOidCmp()\fR function performs a comparison of the given OIDs. This function returns: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 9n .rt if \fIoid1\fR is equal to \fIoid2\fR .RE .sp .ne 2 .mk .na \fB\fB1\fR\fR .ad .RS 9n .rt if \fIoid1\fR is greater than \fIoid2\fR .RE .sp .ne 2 .mk .na \fB\fB\(mi1\fR\fR .ad .RS 9n .rt if \fIoid1\fR is less than \fIoid2\fR .RE .sp .LP The \fBSSAOidCpy()\fR function makes a deep copy of \fIoid2\fR to \fIoid1\fR. This function assumes \fIoid1\fR has been processed by the \fBSSAOidZero()\fR function. Memory is allocated inside \fIoid1\fR and the contents of \fIoid2\fR, not just the pointer, is copied to \fIoid1\fR. If an error is encountered, an error message is stored in the \fIerror_label\fR buffer. .sp .LP The \fBSSAOidDup()\fR function returns a clone of \fIoid\fR, by using the deep copy. Error information is stored in the \fIerror_label\fR buffer. .sp .LP The \fBSSAOidFree()\fR function frees the OID instance, with its content. .sp .LP The \fBSSAOidNew()\fR function returns a new OID. .sp .LP The \fBSSAOidInit()\fR function copies the Subid array from \fIsubids\fR to the OID instance with the specified length \fIlen\fR. This function assumes that the OID instance has been processed by the \fBSSAOidZero()\fR function or no memory is allocated inside the OID instance. If an error is encountered, an error message is stored in the \fIerror_label\fR buffer. .sp .LP The \fBSSAOidString()\fR function returns a char pointer for the printable form of the given \fIoid\fR. .sp .LP The \fBSSAOidStrToOid()\fR function returns a new OID instance from \fIname\fR. If an error is encountered, an error message is stored in the \fIerror_label\fR buffer. .sp .LP The \fBSSAOidZero()\fR function frees the memory used by the OID object for buffers, but not the OID instance itself. .SH RETURN VALUES .sp .LP The \fBSSAOidNew()\fR and \fBSSAOidStrToOid()\fR functions return \fB0\fR if an error is detected. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityObsolete _ MT-LevelUnsafe .TE .SH SEE ALSO .sp .LP \fBattributes\fR(5)