s3: re-run make samba3-idl.
authorGünther Deschner <gd@samba.org>
Thu, 25 Mar 2010 10:02:10 +0000 (11:02 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 25 Mar 2010 10:04:52 +0000 (11:04 +0100)
Guenther

librpc/gen_ndr/drsblobs.h
librpc/gen_ndr/ndr_drsblobs.c
librpc/gen_ndr/ndr_drsblobs.h

index 18ca55879b9029c7b67b5addbf8eddf93d9bf585..b7f9dac3495bcf4ea1b137ae4827fd728111d504 100644 (file)
@@ -457,11 +457,16 @@ struct ExtendedErrorInfoPtr {
        struct ExtendedErrorInfo *info;/* [unique] */
 };
 
+struct ForestTrustString {
+       uint32_t size;/* [value(strlen_m(string))] */
+       const char *string;/* [charset(UTF8)] */
+};
+
 struct ForestTrustDataDomainInfo {
        uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */
        struct dom_sid sid;/* [subcontext_size(sid_size),subcontext(0)] */
-       const char * dns_name;/* [flag(LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM)] */
-       const char * netbios_name;/* [flag(LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM)] */
+       struct ForestTrustString dns_name;
+       struct ForestTrustString netbios_name;
 }/* [flag(LIBNDR_FLAG_NOALIGN)] */;
 
 struct ForestTrustDataBinaryData {
@@ -470,7 +475,7 @@ struct ForestTrustDataBinaryData {
 }/* [flag(LIBNDR_FLAG_NOALIGN)] */;
 
 union ForestTrustData {
-       const char * name;/* [flag(LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM),case(FOREST_TRUST_TOP_LEVEL_NAME)] */
+       struct ForestTrustString name;/* [case(FOREST_TRUST_TOP_LEVEL_NAME)] */
        struct ForestTrustDataDomainInfo info;/* [case(FOREST_TRUST_DOMAIN_INFO)] */
        struct ForestTrustDataBinaryData data;/* [default] */
 }/* [nodiscriminant] */;
index 1ff7aefc87fbee2b89e96fc5bfb90f3d713912bc..7de1de72ea61ba19541e64064ec64f12ccf261b9 100644 (file)
@@ -4058,6 +4058,41 @@ _PUBLIC_ void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *
        ndr->depth--;
 }
 
+static enum ndr_err_code ndr_push_ForestTrustString(struct ndr_push *ndr, int ndr_flags, const struct ForestTrustString *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string)));
+               NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_UTF8));
+               NDR_CHECK(ndr_push_trailer_align(ndr, 4));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ForestTrustString(struct ndr_pull *ndr, int ndr_flags, struct ForestTrustString *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, r->size, sizeof(uint8_t), CH_UTF8));
+               NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ForestTrustString(struct ndr_print *ndr, const char *name, const struct ForestTrustString *r)
+{
+       ndr_print_struct(ndr, name, "ForestTrustString");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->size);
+       ndr_print_string(ndr, "string", r->string);
+       ndr->depth--;
+}
+
 static enum ndr_err_code ndr_push_ForestTrustDataDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct ForestTrustDataDomainInfo *r)
 {
        {
@@ -4072,18 +4107,8 @@ static enum ndr_err_code ndr_push_ForestTrustDataDomainInfo(struct ndr_push *ndr
                                NDR_CHECK(ndr_push_dom_sid(_ndr_sid, NDR_SCALARS, &r->sid));
                                NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
                        }
-                       {
-                               uint32_t _flags_save_string = ndr->flags;
-                               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM);
-                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dns_name));
-                               ndr->flags = _flags_save_string;
-                       }
-                       {
-                               uint32_t _flags_save_string = ndr->flags;
-                               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM);
-                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->netbios_name));
-                               ndr->flags = _flags_save_string;
-                       }
+                       NDR_CHECK(ndr_push_ForestTrustString(ndr, NDR_SCALARS, &r->dns_name));
+                       NDR_CHECK(ndr_push_ForestTrustString(ndr, NDR_SCALARS, &r->netbios_name));
                        NDR_CHECK(ndr_push_trailer_align(ndr, 4));
                }
                if (ndr_flags & NDR_BUFFERS) {
@@ -4107,18 +4132,8 @@ static enum ndr_err_code ndr_pull_ForestTrustDataDomainInfo(struct ndr_pull *ndr
                                NDR_CHECK(ndr_pull_dom_sid(_ndr_sid, NDR_SCALARS, &r->sid));
                                NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sid, 0, r->sid_size));
                        }
-                       {
-                               uint32_t _flags_save_string = ndr->flags;
-                               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM);
-                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dns_name));
-                               ndr->flags = _flags_save_string;
-                       }
-                       {
-                               uint32_t _flags_save_string = ndr->flags;
-                               ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM);
-                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->netbios_name));
-                               ndr->flags = _flags_save_string;
-                       }
+                       NDR_CHECK(ndr_pull_ForestTrustString(ndr, NDR_SCALARS, &r->dns_name));
+                       NDR_CHECK(ndr_pull_ForestTrustString(ndr, NDR_SCALARS, &r->netbios_name));
                        NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
                }
                if (ndr_flags & NDR_BUFFERS) {
@@ -4137,8 +4152,8 @@ _PUBLIC_ void ndr_print_ForestTrustDataDomainInfo(struct ndr_print *ndr, const c
                ndr->depth++;
                ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size);
                ndr_print_dom_sid(ndr, "sid", &r->sid);
-               ndr_print_string(ndr, "dns_name", r->dns_name);
-               ndr_print_string(ndr, "netbios_name", r->netbios_name);
+               ndr_print_ForestTrustString(ndr, "dns_name", &r->dns_name);
+               ndr_print_ForestTrustString(ndr, "netbios_name", &r->netbios_name);
                ndr->depth--;
                ndr->flags = _flags_save_STRUCT;
        }
@@ -4202,21 +4217,11 @@ static enum ndr_err_code ndr_push_ForestTrustData(struct ndr_push *ndr, int ndr_
                NDR_CHECK(ndr_push_union_align(ndr, 4));
                switch (level) {
                        case FOREST_TRUST_TOP_LEVEL_NAME: {
-                               {
-                                       uint32_t _flags_save_string = ndr->flags;
-                                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM);
-                                       NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
-                                       ndr->flags = _flags_save_string;
-                               }
+                               NDR_CHECK(ndr_push_ForestTrustString(ndr, NDR_SCALARS, &r->name));
                        break; }
 
                        case FOREST_TRUST_TOP_LEVEL_NAME_EX: {
-                               {
-                                       uint32_t _flags_save_string = ndr->flags;
-                                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM);
-                                       NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
-                                       ndr->flags = _flags_save_string;
-                               }
+                               NDR_CHECK(ndr_push_ForestTrustString(ndr, NDR_SCALARS, &r->name));
                        break; }
 
                        case FOREST_TRUST_DOMAIN_INFO: {
@@ -4257,21 +4262,11 @@ static enum ndr_err_code ndr_pull_ForestTrustData(struct ndr_pull *ndr, int ndr_
                NDR_CHECK(ndr_pull_union_align(ndr, 4));
                switch (level) {
                        case FOREST_TRUST_TOP_LEVEL_NAME: {
-                               {
-                                       uint32_t _flags_save_string = ndr->flags;
-                                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM);
-                                       NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
-                                       ndr->flags = _flags_save_string;
-                               }
+                               NDR_CHECK(ndr_pull_ForestTrustString(ndr, NDR_SCALARS, &r->name));
                        break; }
 
                        case FOREST_TRUST_TOP_LEVEL_NAME_EX: {
-                               {
-                                       uint32_t _flags_save_string = ndr->flags;
-                                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NOTERM);
-                                       NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
-                                       ndr->flags = _flags_save_string;
-                               }
+                               NDR_CHECK(ndr_pull_ForestTrustString(ndr, NDR_SCALARS, &r->name));
                        break; }
 
                        case FOREST_TRUST_DOMAIN_INFO: {
@@ -4310,11 +4305,11 @@ _PUBLIC_ void ndr_print_ForestTrustData(struct ndr_print *ndr, const char *name,
        ndr_print_union(ndr, name, level, "ForestTrustData");
        switch (level) {
                case FOREST_TRUST_TOP_LEVEL_NAME:
-                       ndr_print_string(ndr, "name", r->name);
+                       ndr_print_ForestTrustString(ndr, "name", &r->name);
                break;
 
                case FOREST_TRUST_TOP_LEVEL_NAME_EX:
-                       ndr_print_string(ndr, "name", r->name);
+                       ndr_print_ForestTrustString(ndr, "name", &r->name);
                break;
 
                case FOREST_TRUST_DOMAIN_INFO:
index 7831fad3618794afbaae47106c5c8756369677e1..40fac7c4b8f8fd38bd0ba5c71ac296beefc2bb5a 100644 (file)
@@ -158,6 +158,7 @@ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags
 enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r);
 void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r);
 void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r);
+void ndr_print_ForestTrustString(struct ndr_print *ndr, const char *name, const struct ForestTrustString *r);
 void ndr_print_ForestTrustDataDomainInfo(struct ndr_print *ndr, const char *name, const struct ForestTrustDataDomainInfo *r);
 void ndr_print_ForestTrustDataBinaryData(struct ndr_print *ndr, const char *name, const struct ForestTrustDataBinaryData *r);
 void ndr_print_ForestTrustData(struct ndr_print *ndr, const char *name, const union ForestTrustData *r);